lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2014-05-28 16:21    [W:0.150 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site