Thread (1 message) 1 message, 1 author, 2018-01-14

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

From: Jonathan Cameron <hidden>
Date: 2018-01-14 13:41:49
Also in: linux-iio

On Thu, 11 Jan 2018 17:00:31 +0800
Phil Reid [off-list ref] wrote:
...
quoted
+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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help