Lines Matching refs:mfd
60 struct sta2x11_mfd *mfd; in sta2x11_mfd_find() local
72 list_for_each_entry(mfd, &sta2x11_mfd_list, list) { in sta2x11_mfd_find()
73 if (mfd->instance == instance) in sta2x11_mfd_find()
74 return mfd; in sta2x11_mfd_find()
82 struct sta2x11_mfd *mfd = sta2x11_mfd_find(pdev); in sta2x11_mfd_add() local
85 if (mfd) in sta2x11_mfd_add()
90 mfd = kzalloc(sizeof(*mfd), flags); in sta2x11_mfd_add()
91 if (!mfd) in sta2x11_mfd_add()
93 INIT_LIST_HEAD(&mfd->list); in sta2x11_mfd_add()
94 for (i = 0; i < ARRAY_SIZE(mfd->lock); i++) in sta2x11_mfd_add()
95 spin_lock_init(&mfd->lock[i]); in sta2x11_mfd_add()
96 mfd->instance = instance; in sta2x11_mfd_add()
97 list_add(&mfd->list, &sta2x11_mfd_list); in sta2x11_mfd_add()
105 struct sta2x11_mfd *mfd = sta2x11_mfd_find(pdev); in __sta2x11_mfd_mask() local
110 if (!mfd) { in __sta2x11_mfd_mask()
115 regs = mfd->regs[index]; in __sta2x11_mfd_mask()
120 spin_lock_irqsave(&mfd->lock[index], flags); in __sta2x11_mfd_mask()
126 spin_unlock_irqrestore(&mfd->lock[index], flags); in __sta2x11_mfd_mask()
137 struct sta2x11_mfd *mfd; in sta2x11_mfd_get_regs_data() local
141 mfd = sta2x11_mfd_find(pdev); in sta2x11_mfd_get_regs_data()
142 if (!mfd) in sta2x11_mfd_get_regs_data()
146 *regs = mfd->regs[index]; in sta2x11_mfd_get_regs_data()
147 *lock = &mfd->lock[index]; in sta2x11_mfd_get_regs_data()
310 struct sta2x11_mfd *mfd; in sta2x11_mfd_platform_probe() local
316 mfd = sta2x11_mfd_find(*pdev); in sta2x11_mfd_platform_probe()
317 if (!mfd) in sta2x11_mfd_platform_probe()
329 mfd->regs[index] = ioremap(res->start, resource_size(res)); in sta2x11_mfd_platform_probe()
330 if (!mfd->regs[index]) { in sta2x11_mfd_platform_probe()
334 regmap_config->lock_arg = &mfd->lock; in sta2x11_mfd_platform_probe()
340 mfd->regmap[index] = devm_regmap_init_mmio(&dev->dev, mfd->regs[index], in sta2x11_mfd_platform_probe()
342 WARN_ON(IS_ERR(mfd->regmap[index])); in sta2x11_mfd_platform_probe()