From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Gwendal Grignou <gwendal@google.com>
Cc: Gwendal Grignou <gwendal@chromium.org>,
knaack.h@gmx.de, linux-iio@vger.kernel.org
Subject: Re: [PATCHv2] iio: ak8975: Add AKM0991x support.
Date: Sat, 08 Nov 2014 12:17:30 +0000 [thread overview]
Message-ID: <545E09DA.3040501@kernel.org> (raw)
In-Reply-To: <1415284340.7340.9.camel@spandruv-hsb-test>
On 06/11/14 14:32, Srinivas Pandruvada wrote:
> On Wed, 2014-11-05 at 13:19 -0800, Gwendal Grignou wrote:
>> On Wed, Nov 5, 2014 at 6:31 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>>> On 04/11/14 19:41, Gwendal Grignou wrote:
>>>> File and config id remains the same, but driver is now named akxxxx.
>>>
>>> Don't do that. Please name the driver after one supported part rather
>>> than a general wild card. Leaving it as ak8975 would be sensible.
>>> Wild cards seem like a good idea until along comes a part that fits
>>> in the naming scheme but is otherwise totally different.
>>>
>>> Much cleaner to just pick a part to use in naming the driver and
>>> make it clear what parts are supported in kconfig (see iio/adc/max1363 for
>>> example).
>> Will do. It is cleaner indeed.
>>>
>>> I would have prefered this as a two patch series. The first combining
>>> the existing drivers, and the second (small one) adding the new part
>>> support.
>> I will submit 3 patches soon:
>> - minor fixes in the driver first,
>> - one that refactor the current driver to introduce a definition data structure
>> - the next one that remove ak9911.c and add support for ak09911 and
>> ak9912 into ak8975.c
>>>
>>> Would have broken it up into logical steps thus making it a little
>>> easier to check for feature parity etc.
>>>
>>> Once you've dropped the name change, this patch will contain less noise.
>>> Also, there are a couple of sensible refactorings in there. I would
>>> have prefered these to be in precursor patches that made much smaller
>>> changes.
>> The re-factoring became obvious after I introduce the definition data structure.
>>>
>>> This sort of merging of drivers is one of the hardest types of code to
>>> review, so making it as easy as possible for reviewers by packaging
>>> it up as baby steps is the way to go.
>>>
>>> There is still some work to be done in convincing people that merging
>>> the drivers is sensible (I'm pretty much convinced having waded through
>>> this) but that is an easier job with a well split up series of steps!
>>>
>>> Jonathan
>>>
>>>> Move AKM09911 support in the same file.
>>>>
>>>> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
>>>> ---
>>>>
>>>> Addressed all comments from Hartmut.
>>>>
>>>> drivers/iio/magnetometer/Kconfig | 19 +-
>>>> drivers/iio/magnetometer/Makefile | 1 -
>>>> drivers/iio/magnetometer/ak09911.c | 326 -------------------
>>>> drivers/iio/magnetometer/ak8975.c | 629 ++++++++++++++++++++++++++-----------
>>>> 4 files changed, 444 insertions(+), 531 deletions(-)
>>>> delete mode 100644 drivers/iio/magnetometer/ak09911.c
>>>>
>>>> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
>>>> index b2dba9e..67f005d 100644
>>>> --- a/drivers/iio/magnetometer/Kconfig
>>>> +++ b/drivers/iio/magnetometer/Kconfig
>>>> @@ -6,26 +6,15 @@
>>>> menu "Magnetometer sensors"
>>>>
>>>> config AK8975
>>>> - tristate "Asahi Kasei AK8975 3-Axis Magnetometer"
>>>> + tristate "Asahi Kasei AK 3-Axis Magnetometer"
>>>> depends on I2C
>>>> depends on GPIOLIB
>>>> help
>>>> - Say yes here to build support for Asahi Kasei AK8975 3-Axis
>>>> - Magnetometer. This driver can also support AK8963, if i2c
>>>> - device name is identified as ak8963.
>>>> + Say yes here to build support for Asahi Kasei AK8975, AK8963,
>>>> + AK09911 or AK09912 3-Axis Magnetometer.
>>>>
>>>> To compile this driver as a module, choose M here: the module
>>>> - will be called ak8975.
>>>> -
>>>> -config AK09911
>>>> - tristate "Asahi Kasei AK09911 3-axis Compass"
>>>> - depends on I2C
>>>> - help
>>>> - Say yes here to build support for Asahi Kasei AK09911 3-Axis
>>>> - Magnetometer.
>>>> -
>>>> - To compile this driver as a module, choose M here: the module
>>>> - will be called ak09911.
>>>> + will be called akxxxx.
>>>>
> We already have released products with CONFIG_AK09911, so will next
> kernel upgrade will break them. Customers don't allow config changes.
> So we can't remove this config.
> Merging of drivers is fine. At the least we should keep the config and
> select the AK8975 when defined in the config if we remove AK09911.
>
> Jonathan,
> What do you think? This driver is part of a commercial released product.
> As you know customers are very sensitive about .config changes.
Absolutely. When merging drivers putting in some config magic
to select the new driver is a common solution.
>
> Thanks,
> Srinivas
>
next prev parent reply other threads:[~2014-11-08 12:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 22:01 [PATCH 0/1] iio: ak8975: Add AKM0991x support Gwendal Grignou
2014-10-29 22:01 ` [PATCH] " Gwendal Grignou
2014-11-03 22:22 ` Hartmut Knaack
2014-11-04 19:41 ` [PATCHv2] " Gwendal Grignou
2014-11-05 14:31 ` Jonathan Cameron
2014-11-05 21:19 ` Gwendal Grignou
2014-11-05 22:10 ` [PATCH 0/3] Support all AKM compass in a single driver Gwendal Grignou
2014-11-05 22:10 ` [PATCH 1/3] iio: ak8975: minor fixes Gwendal Grignou
2014-11-06 15:00 ` Srinivas Pandruvada
2014-11-17 20:13 ` [PATCH v2 " Gwendal Grignou
2014-11-19 11:16 ` Hartmut Knaack
2014-11-05 22:10 ` [PATCH 2/3] iio: ak8975: add definition structure per compass type Gwendal Grignou
2014-11-06 15:02 ` Srinivas Pandruvada
2014-11-06 21:16 ` Gwendal Grignou
2014-11-19 11:25 ` Hartmut Knaack
2014-11-05 22:10 ` [PATCH 3/3] iio: ak8975: add ak09911 and ak09912 support Gwendal Grignou
2014-11-06 15:05 ` Srinivas Pandruvada
2014-11-06 21:25 ` Gwendal Grignou
2014-11-17 18:02 ` Srinivas Pandruvada
2014-11-17 20:15 ` Gwendal Grignou
2014-11-17 20:36 ` Srinivas Pandruvada
2014-11-19 11:39 ` Hartmut Knaack
2014-11-08 12:16 ` Jonathan Cameron
2014-11-14 9:01 ` Gwendal Grignou
2014-11-06 14:32 ` [PATCHv2] iio: ak8975: Add AKM0991x support Srinivas Pandruvada
2014-11-08 12:17 ` Jonathan Cameron [this message]
2014-10-31 15:21 ` [PATCH 0/1] " Srinivas Pandruvada
2014-11-01 21:03 ` Gwendal Grignou
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=545E09DA.3040501@kernel.org \
--to=jic23@kernel.org \
--cc=gwendal@chromium.org \
--cc=gwendal@google.com \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.