Re: [PATCH 2/2] iio: ad5272: Add support for Analog Devices digital potentiometers

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

 



On Thu, 11 Jan 2018 17:00:31 +0800
Phil Reid <preid@xxxxxxxxxxxxxxxxx> wrote:
...

> > +static int ad5272_probe(struct i2c_client *client,
> > +			const struct i2c_device_id *id)
> > +{
> > +	struct device *dev = &client->dev;
> > +	struct gpio_desc *reset_gpio;
> > +	struct iio_dev *indio_dev;
> > +	struct ad5272_data *data;
> > +	int ret;
> > +
> > +	reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
> > +		GPIOD_OUT_LOW);  
> Reset line to the chip is active low, so I guess I should really be setting it to GPIOD_OUT_HIGH.
> Instead of having the DT define it as active-low?
> I'm not sure what makes the most sense.

As long as you are consistent it doesn't really matter.  This flexibility is
more relevant for generic code where we might need to make things work across
both options.

Jonathan


--
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