Re: [PATCH] iio: Add LTC2471/LTC2473 driver

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

 



On 06/30/2017 09:21 AM, Mike Looijmans wrote:
> The LTC2741 and LTC2473 are single voltage ADC chips. The LTC2473
> is similar to the LTC2471 but outputs a signed differential value.
> 
> Datasheet:
>   http://cds.linear.com/docs/en/datasheet/24713fb.pdf
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@xxxxxxxx>

Looks good, thanks!

Reviewed-by: Lars-Peter Clausen <lars@xxxxxxxxxx>

Just two tiny nitpicks inline.

> +static const struct iio_chan_spec ltc2471_channel[] = {
> +	{
> +		.type = IIO_VOLTAGE,
> +		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> +		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
> +		.differential = 0,
> +	},
> +};

There should be a newline here.

> +static const struct iio_chan_spec ltc2473_channel[] = {
> +	{
> +		.type = IIO_VOLTAGE,
> +		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> +		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |
> +					    BIT(IIO_CHAN_INFO_OFFSET),
> +		.differential = 1,
> +	},
> +};
> [...]
> +static int ltc2471_i2c_probe(struct i2c_client *client,
> +			     const struct i2c_device_id *id)
> +{
> [...]
> +	data = iio_priv(indio_dev);
> +	i2c_set_clientdata(client, indio_dev);

You don't need this since i2c_get_clientdata() is never used.

> +	data->client = client;
> +

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