lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 2/4] i2c: add support for Diolan DLN-2 USB-I2C adapter
From
On Fri, Oct 3, 2014 at 4:14 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> Hi,
>
>> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
>> index 2ac87fa..6afc17e 100644
>> --- a/drivers/i2c/busses/Kconfig
>> +++ b/drivers/i2c/busses/Kconfig
>> @@ -1021,4 +1021,14 @@ config SCx200_ACB
>> This support is also available as a module. If so, the module
>> will be called scx200_acb.
>>
>> +config I2C_DLN2
>> + tristate "Diolan DLN-2 USB I2C adapter"
>> + depends on MFD_DLN2
>> + help
>> + If you say yes to this option, support will be included for Diolan
>> + DLN2, a USB to I2C interface.
>> +
>> + This driver can also be built as a module. If so, the module
>> + will be called i2c-dln2.
>> +
>
> Please keep to the existing sorting.
>
>
>> endmenu
>> diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
>> index 49bf07e..3118fea 100644
>> --- a/drivers/i2c/busses/Makefile
>> +++ b/drivers/i2c/busses/Makefile
>> @@ -100,5 +100,6 @@ obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
>> obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o
>> obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o
>> obj-$(CONFIG_SCx200_ACB) += scx200_acb.o
>> +obj-$(CONFIG_I2C_DLN2) += i2c-dln2.o
>
> Ditto!
>
>> +static int dln2_i2c_enable(struct dln2_i2c *dln2, bool enable)
>> +{
>> + int ret;
>> + u16 cmd;
>> +
>> + if (enable)
>> + cmd = DLN2_I2C_ENABLE;
>> + else
>> + cmd = DLN2_I2C_DISABLE;
>
> Ternary operator?
>

In the first versions of the patch it was used, but Johan suggested to avoid it.

I have addressed the rest of you comments, thanks for the review.


\
 
 \ /
  Last update: 2014-10-03 15:01    [W:0.123 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site