[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130124140746.GI12933@pengutronix.de>
Date: Thu, 24 Jan 2013 15:07:46 +0100
From: Wolfram Sang <w.sang@...gutronix.de>
To: Christian Gmeiner <christian.gmeiner@...il.com>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
c.gmeiner@...hmann.info
Subject: Re: [PATCH] at24: extend driver to allow writing via
i2c_smbus_write_byte_data
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 <christian.gmeiner@...il.com>
> ---
> 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?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists