[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51B70BB1.6040703@st.com>
Date: Tue, 11 Jun 2013 12:36:17 +0100
From: Srinivas KANDAGATLA <srinivas.kandagatla@...com>
To: Mark Brown <broonie@...nel.org>
Cc: Mauro Carvalho Chehab <mchehab@...hat.com>,
linux-doc@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>,
linux@....linux.org.uk, Samuel Ortiz <sameo@...ux.intel.com>,
Alexander Shiyan <shc_work@...l.ru>,
Stephen Gallimore <stephen.gallimore@...com>,
linux-serial@...r.kernel.org,
Grant Likely <grant.likely@...aro.org>,
devicetree-discuss@...ts.ozlabs.org,
Rob Herring <rob.herring@...xeda.com>,
Stuart Menefy <stuart.menefy@...com>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-arm-kernel@...ts.infradead.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v2 03/11] regmap: Add regmap_field APIs
On 11/06/13 11:48, Mark Brown wrote:
> On Mon, Jun 10, 2013 at 10:21:58AM +0100, Srinivas KANDAGATLA wrote:
>> It is common to access regmap registers at bit level, using
>> regmap_update_bits or regmap_read functions, however the end user has to
>> take care of a mask or shifting. This becomes overhead when such use
>> cases are high. Having a common function to do this is much convenient
>> and less error prone.
>
> So this looks basically good. A couple of smallish nits below, if you
> could respin I'll apply this on a branch so it can be pulled in as
> dependency for the other things that use it.
>
Thankyou for the comments,
I will fix it and send a v3 patch.
>> + regmap_field_init(rm_field, regmap, reg_field);
>> +
>> + return rm_field;
>> +
>> +}
>> +EXPORT_SYMBOL_GPL(devm_regmap_field_alloc);
>> +/**
>> + * regmap_field_alloc(): Allocate and initialise a register field
>
> Needs a blank line between the two functions.
>
>> +#include <linux/device.h>
>> +#include <linux/slab.h>
>
>> +static inline void regmap_field_free(struct regmap_field *field)
>> +{
>> + kfree(field);
>> +}
>
>> +static inline void devm_regmap_field_free(struct device *dev,
>> + struct regmap_field *field)
>> +{
>> + devm_kfree(dev, field);
>> +}
>
> Probably not worth inlining these, just put them in the code.
>
>
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@...ts.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
--
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