2013/1/24 Wolfram Sang <[email protected]>:
> On Wed, Dec 19, 2012 at 05:07:09PM +0100, Christian Gmeiner wrote:
>> I have a at24 EEPROM connected via i2c bus provided by ISCH i2c
>> bus driver. This bus driver does not support
>> I2C_FUNC_SMBUS_WRITE_I2C_BLOCK and so I was looking for a way
>> to be able to write the eeprom. This patch adds support for
>> I2C_SMBUS_BYTE_DATA writing via i2c_smbus_write_byte_data.
>> It is quite slow, but it works.
>>
>> Signed-off-by: Christian Gmeiner <[email protected]>
>> ---
>> drivers/misc/eeprom/at24.c | 35 +++++++++++++++++++++++++++++------
>> 1 file changed, 29 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
>> index 2baeec5..723b411 100644
>> --- a/drivers/misc/eeprom/at24.c
>> +++ b/drivers/misc/eeprom/at24.c
>> @@ -56,6 +56,7 @@ struct at24_data {
>> struct at24_platform_data chip;
>> struct memory_accessor macc;
>> int use_smbus;
>> + int use_smbuse_write;
>
> Can't you use the same 'use_smbus' variable and do a similar switch-case
> as in the read function?
>
Sorry for the really late answer.
I am not sure if there exits some i2c buses which have different
access methods for read and write.
E.g. I2C_FUNC_SMBUS_WRITE_I2C_BLOCK and I2C_FUNC_SMBUS_READ_BYTE_DATA
If there will never be such a combination then I can reuse the same
'use_smbus' variable.
--
Christian Gmeiner, MSc
Using the new mail address of wolfram sang - got the following error:
Delivery to the following recipient failed permanently:
[email protected]
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the
server for the recipient domainpengutronix.de by mail.pengutronix.de.
[2001:6f8:1178:4:290:27ff:fe1d:cc33].
The error that the other server returned was:
550 Account closed - please contact [email protected] instead
2013/3/27 Christian Gmeiner <[email protected]>:
> 2013/1/24 Wolfram Sang <[email protected]>:
>> On Wed, Dec 19, 2012 at 05:07:09PM +0100, Christian Gmeiner wrote:
>>> I have a at24 EEPROM connected via i2c bus provided by ISCH i2c
>>> bus driver. This bus driver does not support
>>> I2C_FUNC_SMBUS_WRITE_I2C_BLOCK and so I was looking for a way
>>> to be able to write the eeprom. This patch adds support for
>>> I2C_SMBUS_BYTE_DATA writing via i2c_smbus_write_byte_data.
>>> It is quite slow, but it works.
>>>
>>> Signed-off-by: Christian Gmeiner <[email protected]>
>>> ---
>>> drivers/misc/eeprom/at24.c | 35 +++++++++++++++++++++++++++++------
>>> 1 file changed, 29 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
>>> index 2baeec5..723b411 100644
>>> --- a/drivers/misc/eeprom/at24.c
>>> +++ b/drivers/misc/eeprom/at24.c
>>> @@ -56,6 +56,7 @@ struct at24_data {
>>> struct at24_platform_data chip;
>>> struct memory_accessor macc;
>>> int use_smbus;
>>> + int use_smbuse_write;
>>
>> Can't you use the same 'use_smbus' variable and do a similar switch-case
>> as in the read function?
>>
>
> Sorry for the really late answer.
>
> I am not sure if there exits some i2c buses which have different
> access methods for read and write.
> E.g. I2C_FUNC_SMBUS_WRITE_I2C_BLOCK and I2C_FUNC_SMBUS_READ_BYTE_DATA
>
> If there will never be such a combination then I can reuse the same
> 'use_smbus' variable.
>
--
Christian Gmeiner, MSc
Hi Christian,
On Mon, Apr 08, 2013 at 08:56:03AM +0200, Christian Gmeiner wrote:
> Using the new mail address of wolfram sang - got the following error:
>
>
> Delivery to the following recipient failed permanently:
>
> [email protected]
>
> Technical details of permanent failure:
> Google tried to deliver your message, but it was rejected by the
> server for the recipient domainpengutronix.de by mail.pengutronix.de.
> [2001:6f8:1178:4:290:27ff:fe1d:cc33].
>
> The error that the other server returned was:
> 550 Account closed - please contact [email protected] instead
Using [email protected] is correct. Mainline is already up to date.
rsc <- [email protected]
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |