From: peter@korsgaard.com (Peter Korsgaard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] regulator: act8945a: add regulator driver for ACT8945A
Date: Thu, 14 Jan 2016 12:43:00 +0100 [thread overview]
Message-ID: <87a8o82xq3.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <B256D81BAE5131468A838E5D7A243641D63EBEC7@penmbx01> (Wenyou Yang's message of "Thu, 14 Jan 2016 08:07:40 +0000")
>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@atmel.com> writes:
Hi,
>>
>>> Isn't the regulator part of the act8945a identical to act8865? Can't we just use
>>> the existing act8865-regulator.c driver? (E.G. support 8865 variant in the mfd
>>> driver, but only register the regulator sub device?)
>>
>> > Yes, the regulator part of the act8945a is identical to act8865.
>>
>> > But the act8865-regulator driver is a struct i2c_driver, and the mfd > sub-
>> device driver is a platform_driver driver, it is not easy to use > it.
>>
>> But the mfd driver could support the act8865 variant as well (by only registering
>> the regulator mfd cell).
> I still don't understand.
> The MFD sub device is registered as a platform device, the existing
> act8865 driver is registered as an i2c_driver. How do they match? :)
> Could you point out which exiting driver for me to reference. Thank you!
What I'm saying is that it isn't nice that we end up with both
act8865-regulator.c and act8954-regulator.c doing 95% the same. This can
either be fixed by:
- Adding act8865 support to your mfd driver (but only registering the
regulator subdev for act8865) and changing the existing
act8865-regulator driver to work as a mfd subdev (platform device)
- Extending the act8865-regulator driver to register as a platform
driver in ADDITION to a i2c driver so it can be used with mfd. The
driver already uses regmap so it should only be a matter of adding the
pdev probe/remove functions.
--
Venlig hilsen,
Peter Korsgaard
next prev parent reply other threads:[~2016-01-14 11:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 8:17 [PATCH v2 0/2] regulator: act8945a: add regulator driver for the sub-device of ACT8945A MFD Wenyou Yang
2016-01-12 8:17 ` [PATCH v2 1/2] regulator: act8945a: add regulator driver for ACT8945A Wenyou Yang
2016-01-13 14:22 ` Peter Korsgaard
2016-01-14 1:23 ` Yang, Wenyou
2016-01-14 6:19 ` Lee Jones
2016-01-14 7:27 ` Peter Korsgaard
2016-01-14 8:07 ` Yang, Wenyou
2016-01-14 11:43 ` Peter Korsgaard [this message]
2016-01-14 12:46 ` Yang, Wenyou
2016-01-20 7:37 ` Yang, Wenyou
2016-01-20 7:41 ` Peter Korsgaard
2016-01-12 8:17 ` [PATCH v2 2/2] regulator: add documentation for ACT8945A's regulator DT bindings Wenyou Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8o82xq3.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox