Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703405 > unrolled thread

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

Started byRob Herring <robh@kernel.org>
First post2017-08-03 22:30 +0200
Last post2017-08-07 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/3] dt-bindings: add "size" property. Rob Herring <robh@kernel.org> - 2017-08-03 22:30 +0200
    RE: [PATCH 1/3] dt-bindings: add "size" property. "Mohandass, Divagar" <divagar.mohandass@intel.com> - 2017-08-07 11:10 +0200

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

FromRob Herring <robh@kernel.org>
Date2017-08-03 22:30 +0200
SubjectRe: [PATCH 1/3] dt-bindings: add "size" property.
Message-ID<uauUN-56z-1@gated-at.bofh.it>
On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohandass@intel.com wrote:
> From: Divagar Mohandass <divagar.mohandass@intel.com>

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 <divagar.mohandass@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?

Rob

[toc] | [next] | [standalone]


#1705270

From"Mohandass, Divagar" <divagar.mohandass@intel.com>
Date2017-08-07 11:10 +0200
Message-ID<ubMcV-6gU-3@gated-at.bofh.it>
In reply to#1703405
>-----Original Message-----
>From: Rob Herring [mailto:robh@kernel.org]
>Sent: Friday, August 04, 2017 1:58 AM
>To: Mohandass, Divagar <divagar.mohandass@intel.com>
>Cc: mark.rutland@arm.com; wsa@the-dreams.de;
>devicetree@vger.kernel.org; linux-i2c@vger.kernel.org; linux-
>kernel@vger.kernel.org; Mani, Rajmohan <rajmohan.mani@intel.com>
>Subject: Re: [PATCH 1/3] dt-bindings: add "size" property.
>
>On Thu, Jul 27, 2017 at 10:13:07PM +0530, divagar.mohandass@intel.com
>wrote:
>> From: Divagar Mohandass <divagar.mohandass@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.mohandass@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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web