Re: [PATCH v3 1/4] mfd: intel_soc_pmic: Core driver

From: Zhu, Lejun
Date: Tue May 27 2014 - 23:07:54 EST




On 5/27/2014 11:35 PM, Lee Jones wrote:
>> This patch provides the common code for the intel_soc_pmic MFD driver, such as read/write register and set up IRQ.
(...)
>> +/*
>> +* Set and clear multiple bits of a PMIC register
>> +*/
>> +int intel_soc_pmic_update(int reg, u8 val, u8 mask)
>> +{
>> + int ret;
>> +
>> + mutex_lock(&pmic_lock);
>> +
>> + if (!pmic)
>> + ret = -EIO;
>> + else
>> + ret = regmap_update_bits(pmic->regmap, reg, mask, val);
>> +
>> + mutex_unlock(&pmic_lock);
>> +
>> + return ret;
>> +}
>> +EXPORT_SYMBOL_GPL(intel_soc_pmic_update);
>
> I'm really not a fan of all these pointless agregation call-backs. I
> see them as unesersary overhead. Just use the regmap API directly.

OK. I'll remove these wrappers from the MFD driver, seems no one likes
them...

I'll fix the patch set as you suggested and resubmit. Thank you for
reviewing this.

Best Regards
Lejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/