[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5385E458.3040601@roeck-us.net>
Date: Wed, 28 May 2014 06:27:52 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Johannes Thumshirn <johannes.thumshirn@....de>,
Lee Jones <lee.jones@...aro.org>
CC: Andreas Werner <andreas.werner@....de>,
linux-kernel@...r.kernel.org, sameo@...ux.intel.com, wim@...ana.be,
linux-watchdog@...r.kernel.org, cooloney@...il.com,
rpurdie@...ys.net, linux-leds@...r.kernel.org
Subject: Re: [PATCH v2 1/3] drivers/mfd/menf21bmc: introduce MEN 14F021P00
BMC MFD Core driver
On 05/28/2014 12:02 AM, Johannes Thumshirn wrote:
[ ... ]
>>> +
>>> +static int menf21bmc_write_byte(struct i2c_client *client, u8 val)
>>> +{
>>> + int ret;
>>> + struct menf21bmc *data = i2c_get_clientdata(client);
>>> +
>>> + mutex_lock(&data->lock);
>>> + ret = i2c_smbus_write_byte(client, val);
>>> + mutex_unlock(&data->lock);
>>> +
>>> + return ret;
>>> +}
>>
>> Didn't we ask you to remove these? Just make the i2c_smbus_* calls
>> from within the driver. The I2C subsystem conducts its own locking.
>> I'm really starting to frown on aggregation for the sake of
>> aggregation. It's just overhead.
>>
>
> Correct me if I'm wrong but as far as I remember Guenther asked to retain the
> original API, not the remove the "abstraction layer". Once we build a board with
> one of these BMCs attached via e.g. SPI we would have to reintroduce it anyways,
> in order to re-use these drivers.
>
If you introduce boards with SPI support, you'll likely have to change those APIs,
since some of the functions don't make sense in the SPI world. So I tend to agree
with Lee. If you need those APIs later on you can introduce them at that time,
and introduce them such that they truly work for all hardware variants.
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists