From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Alejandro del Rio <scasbyte@gmail.com>
Cc: Rodolfo Giometti <giometti@enneenne.it>,
Jean Delvare <khali@linux-fr.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH 2/2] hwmon: (w83627ehf) Add GPIO port 3 functionality
Date: Mon, 16 Jan 2012 08:18:31 -0800 [thread overview]
Message-ID: <20120116161831.GB7363@ericsson.com> (raw)
In-Reply-To: <4F13F10F.7030606@gmail.com>
Hi folks,
On Mon, Jan 16, 2012 at 04:42:39AM -0500, Alejandro del Rio wrote:
> Hi Rodolfo,
>
> On 15-Jan-12 4:53 AM, Rodolfo Giometti wrote:
> > On Sat, Jan 14, 2012 at 04:15:08PM -0600, Alejandro wrote:
> >>
> >> The patch looks great, and it is definitely more maintainable. I'll
> >> create a patch for the w83627ehf driver and send it as soon as
> >> possible. Should I make the patch for the w83627hf or wait for
> >> Rodolfo???
> >
> > I already sent a new version of my patches... here you can find a copy
> > of my message:
> >
> > http://www.spinics.net/lists/lm-sensors/msg33656.html
> >
> > Please, ask to me whatever you need since I'd like very much these
> > patches will be added to the kernel main tree! :)
> >
> > Ciao,
> >
> > Rodolfo
>
> The patch as it is posted on "lm-sensors/msg33656.html" mailing list
> does not apply to the latest tree. After making some changes it applies
> cleanly to 3.2 tree. The issues were:
>
> -The gpio naming convention is now "gpio-[name of the driver]" instead
> of "[name of driver]_gpio"
> -Line changes in the Kconfig
> -Some email addresses converted to @xxxxxxx (by the lm-sensors mailing
> list I guess)
>
> Please look at the attachments for the new patches (I take no credit for
> the changes as it was a trivial clean-up), if you like the changes I
> would recommend starting a new thread on this list to get reviews.
>
> Note: I couldn't test the driver because my platform has not an HF chip
> but the patch looks good so far =)
>
> BR!
>
> Alex
> From 932beeb80d022c5bab861ea4d8d78cd82cae0bba Mon Sep 17 00:00:00 2001
> From: Alejandro del Rio <scasbyte@gmail.com>
> Date: Mon, 16 Jan 2012 00:32:21 -0800
> Subject: [PATCH 1/2] [temporal change]
>
> [temporal change]
>
>
> Signed-off-by: Alejandro del Rio <scasbyte@gmail.com>
> ---
> drivers/hwmon/w83627hf.c | 331 ++++++++++++----------------------------------
> 1 files changed, 86 insertions(+), 245 deletions(-)
>
[ ... ]
> static int __devinit w83627hf_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> - struct w83627hf_sio_data *sio_data = dev->platform_data;
> + struct w83627hf_sio_data *sio_data = dev->parent->platform_data;
> struct w83627hf_data *data;
> - struct resource *res;
> int err, i;
>
> - static const char *names[] = {
> - "w83627hf",
> - "w83627thf",
> - "w83697hf",
> - "w83637hf",
> - "w83687thf",
> + struct resource res = {
> + .start = /* address + */ WINB_REGION_OFFSET,
> + .end = /* address + */ WINB_REGION_OFFSET +
> + WINB_REGION_SIZE - 1,
> + .name = DRVNAME "_hwmon",
> + .flags = IORESOURCE_IO,
> };
>
> - res = platform_get_resource(pdev, IORESOURCE_IO, 0);
> - if (!request_region(res->start, WINB_REGION_SIZE, DRVNAME)) {
> + err = w83627hf_enable_hwmon(sio_data);
> + if (err < 0)
> + return err;
> +
> + /* Before doing our job we should fixup ioport range */
> + res.start += err;
> + res.end += err;
> +
This doesn't look right. The mfd driver should pass resource information
to its child devices via mfd_add_device(), which adds it to the child device
platform data. Can you check how other mfd devices handle this ?
Guenter
prev parent reply other threads:[~2012-01-16 16:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 1:39 Alex Rio
2012-01-14 17:54 ` Guenter Roeck
2012-01-14 20:18 ` Jean Delvare
2012-01-14 22:15 ` Alejandro
2012-01-15 8:15 ` Jean Delvare
2012-01-15 10:53 ` Rodolfo Giometti
2012-01-16 9:42 ` Alejandro del Rio
2012-01-16 16:18 ` Guenter Roeck [this message]
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=20120116161831.GB7363@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=giometti@enneenne.it \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scasbyte@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome