RE: [PATCH 1/3] dt-bindings: add "size" property.

2017-09-04 Thread Mohandass, Divagar

>-Original Message-
>From: Wolfram Sang [mailto:w...@the-dreams.de]
>Sent: Monday, September 04, 2017 2:28 PM
>To: Mohandass, Divagar <divagar.mohand...@intel.com>
>Cc: Rob Herring <r...@kernel.org>; mark.rutl...@arm.com;
>devicet...@vger.kernel.org; linux-...@vger.kernel.org; linux-
>ker...@vger.kernel.org; Mani, Rajmohan <rajmohan.m...@intel.com>
>Subject: Re: [PATCH 1/3] dt-bindings: add "size" property.
>
>
>> If you want to use an existing ID for an eeprom for a different size,
>> there is no way to override it currently.
>
>Can you give an example for that?

There is a CAT24C16/GT24C16S NVMEM chip part of the OV13858
camera module and it is connected to i2c bus on Intel KBL board.
This device will use the existing ACPI ID INT3499 for an eeprom of size 2048 
byte.



RE: [PATCH 1/3] dt-bindings: add "size" property.

2017-09-04 Thread Mohandass, Divagar

>-Original Message-
>From: Wolfram Sang [mailto:w...@the-dreams.de]
>Sent: Monday, September 04, 2017 2:28 PM
>To: Mohandass, Divagar 
>Cc: Rob Herring ; mark.rutl...@arm.com;
>devicet...@vger.kernel.org; linux-...@vger.kernel.org; linux-
>ker...@vger.kernel.org; Mani, Rajmohan 
>Subject: Re: [PATCH 1/3] dt-bindings: add "size" property.
>
>
>> If you want to use an existing ID for an eeprom for a different size,
>> there is no way to override it currently.
>
>Can you give an example for that?

There is a CAT24C16/GT24C16S NVMEM chip part of the OV13858
camera module and it is connected to i2c bus on Intel KBL board.
This device will use the existing ACPI ID INT3499 for an eeprom of size 2048 
byte.



Re: [PATCH 1/3] dt-bindings: add "size" property.

2017-09-04 Thread Wolfram Sang

> If you want to use an existing ID for an eeprom for a different size,
> there is no way to override it currently. 

Can you give an example for that?



signature.asc
Description: PGP signature


Re: [PATCH 1/3] dt-bindings: add "size" property.

2017-09-04 Thread Wolfram Sang

> If you want to use an existing ID for an eeprom for a different size,
> there is no way to override it currently. 

Can you give an example for that?



signature.asc
Description: PGP signature


RE: [PATCH 1/3] dt-bindings: add "size" property.

2017-08-07 Thread Mohandass, Divagar
>-Original Message-
>From: Rob Herring [mailto:r...@kernel.org]
>Sent: Friday, August 04, 2017 1:58 AM
>To: Mohandass, Divagar <divagar.mohand...@intel.com>
>Cc: mark.rutl...@arm.com; w...@the-dreams.de;
>devicet...@vger.kernel.org; linux-...@vger.kernel.org; linux-
>ker...@vger.kernel.org; Mani, Rajmohan <rajmohan.m...@intel.com>
>Subject: Re: [PATCH 1/3] dt-bindings: add "size" property.
>
>On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohand...@intel.com
>wrote:
>> From: Divagar Mohandass <divagar.mohand...@intel.com>
>
>Please improve the subject. Add size to what?

I will update the title to say 'add eeprom "size" property' in the next version.

>
>>
>> This adds "size" as optional property for i2c eeproms.
>>
>> "size" should be mentioned in byte and it should refer to the eeprom
>> size. This will be read by the driver and used to calculating the
>> number of bytes in read/write calls.
>>
>> Signed-off-by: Divagar Mohandass <divagar.mohand...@intel.com>
>> ---
>>  Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> b/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> index 5696eb5..1436569 100644
>> --- a/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> @@ -32,6 +32,8 @@ Optional properties:
>>
>>- read-only: this parameterless property disables writes to the
>> eeprom
>>
>> +  - size: total eeprom size in bytes
>> +
>
>This should be implied by the compatible string of the eeprom. Why do you
>need this?

This eeprom "size" property is optional for at24 driver, 
In the at24 driver size information is passed as part of the i2c_device_id' 
driver_data during initial probe. If you want to use an existing ID for an 
eeprom for a different size, there is no way to override it currently. 
By introducing an optional size device property, we can reuse IDs for chips of
different sizes.

This is also consistent with the implementation in the at25 driver.

>
>Rob


RE: [PATCH 1/3] dt-bindings: add "size" property.

2017-08-07 Thread Mohandass, Divagar
>-Original Message-
>From: Rob Herring [mailto:r...@kernel.org]
>Sent: Friday, August 04, 2017 1:58 AM
>To: Mohandass, Divagar 
>Cc: mark.rutl...@arm.com; w...@the-dreams.de;
>devicet...@vger.kernel.org; linux-...@vger.kernel.org; linux-
>ker...@vger.kernel.org; Mani, Rajmohan 
>Subject: Re: [PATCH 1/3] dt-bindings: add "size" property.
>
>On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohand...@intel.com
>wrote:
>> From: Divagar Mohandass 
>
>Please improve the subject. Add size to what?

I will update the title to say 'add eeprom "size" property' in the next version.

>
>>
>> This adds "size" as optional property for i2c eeproms.
>>
>> "size" should be mentioned in byte and it should refer to the eeprom
>> size. This will be read by the driver and used to calculating the
>> number of bytes in read/write calls.
>>
>> Signed-off-by: Divagar Mohandass 
>> ---
>>  Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> b/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> index 5696eb5..1436569 100644
>> --- a/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt
>> @@ -32,6 +32,8 @@ Optional properties:
>>
>>- read-only: this parameterless property disables writes to the
>> eeprom
>>
>> +  - size: total eeprom size in bytes
>> +
>
>This should be implied by the compatible string of the eeprom. Why do you
>need this?

This eeprom "size" property is optional for at24 driver, 
In the at24 driver size information is passed as part of the i2c_device_id' 
driver_data during initial probe. If you want to use an existing ID for an 
eeprom for a different size, there is no way to override it currently. 
By introducing an optional size device property, we can reuse IDs for chips of
different sizes.

This is also consistent with the implementation in the at25 driver.

>
>Rob


Re: [PATCH 1/3] dt-bindings: add "size" property.

2017-08-03 Thread Rob Herring
On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohand...@intel.com wrote:
> From: Divagar Mohandass 

Please improve the subject. Add size to what?

> 
> This adds "size" as optional property for i2c eeproms.
> 
> "size" should be mentioned in byte and it should refer
> to the eeprom size. This will be read by the driver and
> used to calculating the number of bytes in read/write calls.
> 
> Signed-off-by: Divagar Mohandass 
> ---
>  Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt 
> b/Documentation/devicetree/bindings/eeprom/eeprom.txt
> index 5696eb5..1436569 100644
> --- a/Documentation/devicetree/bindings/eeprom/eeprom.txt
> +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt
> @@ -32,6 +32,8 @@ Optional properties:
>  
>- read-only: this parameterless property disables writes to the eeprom
>  
> +  - size: total eeprom size in bytes
> +

This should be implied by the compatible string of the eeprom. Why do 
you need this?

Rob


Re: [PATCH 1/3] dt-bindings: add "size" property.

2017-08-03 Thread Rob Herring
On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohand...@intel.com wrote:
> From: Divagar Mohandass 

Please improve the subject. Add size to what?

> 
> This adds "size" as optional property for i2c eeproms.
> 
> "size" should be mentioned in byte and it should refer
> to the eeprom size. This will be read by the driver and
> used to calculating the number of bytes in read/write calls.
> 
> Signed-off-by: Divagar Mohandass 
> ---
>  Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt 
> b/Documentation/devicetree/bindings/eeprom/eeprom.txt
> index 5696eb5..1436569 100644
> --- a/Documentation/devicetree/bindings/eeprom/eeprom.txt
> +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt
> @@ -32,6 +32,8 @@ Optional properties:
>  
>- read-only: this parameterless property disables writes to the eeprom
>  
> +  - size: total eeprom size in bytes
> +

This should be implied by the compatible string of the eeprom. Why do 
you need this?

Rob