From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>, "Pavel Machek" <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Linus Walleij <linus.walleij@linaro.org>,
Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH v3 3/4] leds: pca955x: add GPIO support
Date: Thu, 24 Aug 2017 22:03:59 +0200 [thread overview]
Message-ID: <c403ddf1-a26c-1ccc-f722-eacac6115c34@gmail.com> (raw)
In-Reply-To: <4a6d3c67-c7ac-664c-2506-8c5e0530a2c1@kaod.org>
Hi Cedric,
On 08/24/2017 01:30 PM, Cédric Le Goater wrote:
> On 08/12/2017 10:42 AM, Pavel Machek wrote:
>> Hi!
>>
>>>>>>> +static u8 pca955x_read_input(struct i2c_client *client, int n)
>>>>>>> +{
>>>>>>> + return (u8)i2c_smbus_read_byte_data(client, n);
>>>>>>> +}
>>>>>>
>>>>>> Is the cast needed? Should you attempt to handle errors?
>>>>>
>>>>> ah. this is a left over. I can fix in a resend.
>>>>
>>>> No need to resend just for this.
>>>>
>>>> Should you WARN_ON() if the read_byte_data returns < 0 or something?
>>>>
>>>> https://linuxtv.org/downloads/v4l-dvb-internals/device-drivers/API-i2c-smbus-read-byte-data.html
>>>
>>> I don't think so as this is just to read the gpio value.
>>>
>>> I suppose that the i2c layer will output some errors before
>>> if it catches some invalid state.
>>
>> Normally its driver's job to output errors. (Same for write).
>
> ok. I can respin the patchset with an extra patch adding checks
> for I2C errors (see below). In which order would you want that,
> before the gpio support or after ?
I'd prefer an incremental patch. The patch set has received 10
days of testing and the merge window is imminent. Not the best
moment to respin the for-next branch.
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2017-08-24 20:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 13:42 [PATCH v3 0/4] leds: pca955x: add GPIO support Cédric Le Goater
2017-08-08 13:42 ` [PATCH v3 2/4] leds: pca955x: use devm_led_classdev_register Cédric Le Goater
[not found] ` <1502199760-763-1-git-send-email-clg-Bxea+6Xhats@public.gmane.org>
2017-08-08 13:42 ` [PATCH v3 1/4] leds: pca955x: add device tree support Cédric Le Goater
2017-08-08 13:42 ` [PATCH v3 3/4] leds: pca955x: add GPIO support Cédric Le Goater
2017-08-11 13:47 ` Pavel Machek
2017-08-11 15:11 ` Cédric Le Goater
[not found] ` <9330f31a-110c-8398-8cd1-764f8dd358e9-Bxea+6Xhats@public.gmane.org>
2017-08-11 15:37 ` Pavel Machek
2017-08-11 16:26 ` Cédric Le Goater
2017-08-12 8:42 ` Pavel Machek
2017-08-24 11:30 ` Cédric Le Goater
2017-08-24 20:03 ` Jacek Anaszewski [this message]
[not found] ` <c403ddf1-a26c-1ccc-f722-eacac6115c34-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-24 21:32 ` Cédric Le Goater
2017-08-08 13:42 ` [PATCH v3 4/4] dt-bindings leds: add pca955x Cédric Le Goater
2017-08-14 20:28 ` [PATCH v3 0/4] leds: pca955x: add GPIO support Jacek Anaszewski
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=c403ddf1-a26c-1ccc-f722-eacac6115c34@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=clg@kaod.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=linus.walleij@linaro.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.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).