From: "Ville Syrjälä" <syrjala@sci.fi>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] w1-gpio: Add GPIO w1 bus master driver
Date: Fri, 21 Dec 2007 14:42:13 +0200 [thread overview]
Message-ID: <20071221124213.GG15861@sci.fi> (raw)
In-Reply-To: <20071221104127.GA28474@2ka.mipt.ru>
On Fri, Dec 21, 2007 at 01:41:28PM +0300, Evgeniy Polyakov wrote:
> Hi Ville.
>
> On Fri, Dec 21, 2007 at 09:34:01AM +0200, Ville Syrjala (syrjala@sci.fi) wrote:
> > Add a GPIO 1-wire bus master driver. The driver used the GPIO API to
> > control the wire and the GPIO pin can be specified using platform data
> > similar to i2c-gpio. The driver was tested with AT91SAM9260 + DS2401.
>
> This looks ok, only a minor nit about codying style below.
>
> > Signed-off-by: Ville Syrjala <syrjala@sci.fi>
>
> ACK.
>
> > +static int __init w1_gpio_probe(struct platform_device *pdev)
> > +{
> > + struct w1_bus_master *master;
> > + struct w1_gpio_platform_data *pdata;
> > + int err;
> > +
> > + pdata = pdev->dev.platform_data;
> > + if (!pdata)
> > + return -ENXIO;
> > +
> > + master = kzalloc(sizeof *master, GFP_KERNEL);
> > + if (!master)
> > + return -ENOMEM;
>
> I think sizeof(struct w1_bus_master) is a better way.
Will change.
> > new file mode 100644
> > index 0000000..3b80bb2
> > --- /dev/null
> > +++ b/include/linux/w1-gpio.h
>
> Does anyone use this file except driver itself?
It's supposed to be used by the code that registers the platform device
(see the example in the documentation). No in-tree users since the board
I'm using is not supported by the kernel.
I just had a better look at i2c-gpio and noticed that I missed
gpio_request()/gpio_free() calls from the driver. Also the open-drain
requirement could be removed like i2c-gpio does. I'll send a new patch
ASAP.
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
next prev parent reply other threads:[~2007-12-21 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-21 7:34 [PATCH] w1-gpio: Add GPIO w1 bus master driver Ville Syrjala
2007-12-21 10:41 ` Evgeniy Polyakov
2007-12-21 12:42 ` Ville Syrjälä [this message]
2007-12-26 22:24 ` Haavard Skinnemoen
2008-01-03 13:48 ` Ville Syrjälä
2008-01-03 13:58 ` Haavard Skinnemoen
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=20071221124213.GG15861@sci.fi \
--to=syrjala@sci.fi \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.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