Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601286
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger |
| Date | 2017-03-15 12:10 +0100 |
| Message-ID | <tleYz-6NF-43@gated-at.bofh.it> (permalink) |
| References | <tkwb8-8aF-3@gated-at.bofh.it> <tkwb8-8aF-17@gated-at.bofh.it> <tkx7c-nh-15@gated-at.bofh.it> <tldJ9-5Lz-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 15, 2017 at 11:49 AM, Eva Rachel Retuya <eraretuya@gmail.com> wrote:
> On Mon, Mar 13, 2017 at 02:12:54PM +0200, Andy Shevchenko wrote:
>> On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya <eraretuya@gmail.com> wrote:
> Hello Andy,
> Thanks for the review.
You are welcome!
>> > +static irqreturn_t adxl345_irq(int irq, void *p)
>> > +{
>> > + struct iio_dev *indio_dev = p;
>> > + struct adxl345_data *data = iio_priv(indio_dev);
>> > + int ret = IRQ_NONE;
>> > + u32 int_stat;
>> > +
>>
>> > + ret = regmap_read(data->regmap, ADXL345_REG_INT_SOURCE, &int_stat);
>>
>> > + if (ret < 0)
>> > + return ret;
>>
>> It makes little sense AFAIU.
>>
>
> Can you please elaborate further your comment regarding this?
It's defined as enum and returned value is not in a range.
Also it would be useful to look at kernel/irq/manage.c for the
implementation details.
>> P.S. Are you doing this stuff on your own or you are working for some
>> company? If the latter applies, please, consider to do *internal*
>> review first.
> I'm doing it on my own as a project for Outreachy and have mentors to ask
> for advice and/or questions.
Ah, okay, that is fine then!
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger Eva Rachel Retuya <eraretuya@gmail.com> - 2017-03-15 10:50 +0100 Re: [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-15 12:10 +0100
csiph-web