lkml.org 
[lkml]   [2012]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 7/7] MFD: TWL6040: Add regulator support for VIO, V2V1 supplies
On Tue, Feb 07, 2012 at 03:01:18PM +0200, Peter Ujfalusi wrote:
> twl6040 has three power supply source:
> VBAT needs to be connected to VBAT, VIO, and V2V1.
> Add regulator support for the VIO, V2V1 supplies.
> Initially handle the two supply together with bulk commands.

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

> + twl6040->supplies = devm_kzalloc(&client->dev,
> + sizeof(struct regulator_bulk_data) *
> + TWL6040_NUM_SUPPLIES, GFP_KERNEL);
> + if (!twl6040->supplies) {
> + ret = -ENOMEM;
> + goto err;
> + }
> +

though I'd be inclined to just embed this structure into the twl6040
struct directly, you're always going to need to allocate it and it saves
a tiny bit of error handling and whatnot.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-02-07 14:19    [W:0.151 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site