Re: [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 15, 2017 at 11:49 AM, Eva Rachel Retuya <eraretuya@xxxxxxxxx> 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@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux