From: Marek Vasut <marex@denx.de>
To: "Ksenija Stanojević" <ksenija.stanojevic@gmail.com>
Cc: linux-kernel@vger.kernel.org, lee.jones@linaro.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, Harald Geyer <harald@ccbib.org>
Subject: Re: [PATCH 1/3] mfd: mxs-lradc: Add support for mxs-lradc MFD
Date: Fri, 29 Apr 2016 16:12:52 +0200 [thread overview]
Message-ID: <57236BE4.908@denx.de> (raw)
In-Reply-To: <CAL7P5j+E1WzC9AsS=ge4oHVTwq7Tov=kGbfJSKGyRzjg6Arg5Q@mail.gmail.com>
On 04/29/2016 03:43 PM, Ksenija Stanojević wrote:
> On Fri, Apr 29, 2016 at 3:15 PM, Marek Vasut <marex@denx.de> wrote:
>> On 04/29/2016 01:47 PM, Ksenija Stanojevic wrote:
>>> Add core files for mxs-lradc MFD driver.
>>>
>>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
>>> ---
>>> drivers/mfd/Kconfig | 33 +++++--
>>> drivers/mfd/Makefile | 1 +
>>> drivers/mfd/mxs-lradc.c | 213 ++++++++++++++++++++++++++++++++++++++++++
>>> include/linux/mfd/mxs-lradc.h | 210 +++++++++++++++++++++++++++++++++++++++++
>>> 4 files changed, 449 insertions(+), 8 deletions(-)
>>> create mode 100644 drivers/mfd/mxs-lradc.c
>>> create mode 100644 include/linux/mfd/mxs-lradc.h
>>
>> Is there any chance you can also remove the same code from lradc ?
>
> You mean drivers/iio/adc/mxs-lradc.c. I thought to remove it once this
> patch set was accepted,
> but I can include that in patch set.
I'd much rather see one driver mutate into another than having two
drivers in the tree. If that's possible without crazy amount of effort
that is.
>>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>>> index eea61e3..fff44d6 100644
>>> --- a/drivers/mfd/Kconfig
>>> +++ b/drivers/mfd/Kconfig
>>> @@ -16,7 +16,7 @@ config MFD_CS5535
>>> depends on PCI && (X86_32 || (X86 && COMPILE_TEST))
>>> ---help---
>>> This is the core driver for CS5535/CS5536 MFD functions. This is
>>> - necessary for using the board's GPIO and MFGPT functionality.
>>> + necessary for using the board's GPIO and MFGPT functionality.
>>
>> Probably shouldn't be part of the patch ?
>
> Yeah, sorry about that.
:)
>>> config MFD_ACT8945A
>>> tristate "Active-semi ACT8945A"
>>> @@ -319,6 +319,23 @@ config MFD_HI6421_PMIC
>>> menus in order to enable them.
>>> We communicate with the Hi6421 via memory-mapped I/O.
>>>
>>> +config MFD_MXS_LRADC
>>> + tristate "Freescale i.MX23/i.MX28 LRADC"
>>> + depends on ARCH_MXS || COMPILE_TEST
>>> + select MFD_CORE
>>> + select STMP_DEVICE
>>> + help
>>> + Say yes here to build support for the low-resolution
>>> + analog-to-digital converter (LRADC) found on the i.MX23 and i.MX28
>>> + processors. This driver provides common support for accessing the
>>> + device, additional drivers must be enabled in order to use the
>>> + functionality of the device:
>>> + mxs-lradc-adc for ADC readings
>>> + mxs-lradc-ts for touchscreen support
>>> +
>>> + This driver can also be built as a module. If so, the module will be
>>> + called mxs-lradc.
>>> +
>>> config HTC_EGPIO
>>> bool "HTC EGPIO support"
>>> depends on GPIOLIB && ARM
>>> @@ -650,7 +667,7 @@ config EZX_PCAP
>>> needed for MMC, TouchScreen, Sound, USB, etc..
>>>
>>> config MFD_VIPERBOARD
>>> - tristate "Nano River Technologies Viperboard"
>>> + tristate "Nano River Technologies Viperboard"
>>
>> Shouldn't be part of this patch
>
> No, I should have check it twice.
Yeah, but that's what the patch review process is for.
[...]
>>> + ret = mfd_add_devices(&pdev->dev, -1, &lradc_ts_dev, 1, NULL, 0, NULL);
>>
>> devm_mfd_add_devices()?
>>
>> You might want to split registration of each MFD subdev into separate
>> function.
>
> Ok, I will fix it in v2
Just be careful not to introduce a race with enabling/disabling the
clock. That's something I am not sure about and something which might
bite you.
>>> + if (ret) {
>>> + dev_err(&pdev->dev,
>>> + "Failed to add the touchscreen subdevice\n");
>>> + goto err_remove_adc;
>>> + }
>>> +
>>> + return 0;
>>> +
>>> +err_remove_adc:
>>> + mfd_remove_devices(&pdev->dev);
>>> +err_clk:
>>> + clk_disable_unprepare(lradc->clk);
>>> + return ret;
>>> +}
>>> +
>>> +static int mxs_lradc_remove(struct platform_device *pdev)
>>> +{
>>> + struct mxs_lradc *lradc = platform_get_drvdata(pdev);
>>> +
>>> + mfd_remove_devices(&pdev->dev);
>>> + clk_disable_unprepare(lradc->clk);
>>> + return 0;
>>> +}
>>> +
>>> +static struct platform_driver mxs_lradc_driver = {
>>> + .driver = {
>>> + .name = "mxs-lradc",
>>> + .of_match_table = mxs_lradc_dt_ids,
>>> + },
>>> + .probe = mxs_lradc_probe,
>>> + .remove = mxs_lradc_remove,
>>> +};
>>> +
>>> +module_platform_driver(mxs_lradc_driver);
>>> +
>>> +MODULE_DESCRIPTION("Freescale i.MX23/i.MX28 LRADC driver");
>>> +MODULE_LICENSE("GPL v2");
>>> +MODULE_ALIAS("platform:mxs-lradc");
>>
>> [...]
>>
>>
>> --
>> Best regards,
>> Marek Vasut
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-04-29 14:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 11:46 [PATCH 0/3] mxs-lradc: Split driver into MFD Ksenija Stanojevic
2016-04-29 11:48 ` [PATCH 2/3] iio: adc: mxs-lradc: Add support for adc driver Ksenija Stanojevic
2016-04-29 13:21 ` Marek Vasut
2016-05-01 16:38 ` Jonathan Cameron
2016-05-28 17:49 ` Ksenija Stanojević
2016-05-29 16:46 ` Jonathan Cameron
2016-04-29 11:49 ` [PATCH 3/3] input: touchscreen: mxs-lradc: Add support for touchscreen Ksenija Stanojevic
2016-04-29 13:22 ` Marek Vasut
2016-04-29 23:36 ` Dmitry Torokhov
2016-04-29 23:57 ` Marek Vasut
2016-05-02 16:58 ` Dmitry Torokhov
2016-05-28 17:46 ` Ksenija Stanojević
2016-06-01 18:29 ` Dmitry Torokhov
2016-05-01 16:47 ` Jonathan Cameron
2016-05-28 17:45 ` Ksenija Stanojević
2016-05-29 16:49 ` Jonathan Cameron
2016-05-29 18:00 ` Ksenija Stanojević
2016-05-29 19:53 ` Jonathan Cameron
[not found] ` <a93050366ed452b147652abfad21a87f4af87bfb.1461930102.git.ksenija.stanojevic@gmail.com>
2016-04-29 13:15 ` [PATCH 1/3] mfd: mxs-lradc: Add support for mxs-lradc MFD Marek Vasut
2016-04-29 13:43 ` Ksenija Stanojević
2016-04-29 14:12 ` Marek Vasut [this message]
2016-04-29 17:19 ` Harald Geyer
2016-05-01 13:06 ` Jonathan Cameron
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=57236BE4.908@denx.de \
--to=marex@denx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=harald@ccbib.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=ksenija.stanojevic@gmail.com \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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;
as well as URLs for NNTP newsgroup(s).