[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120207131657.GL3332@opensource.wolfsonmicro.com>
Date: Tue, 7 Feb 2012 13:16:57 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@...com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Tony Lindgren <tony@...mide.com>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Liam Girdwood <lrg@...com>, Dmitry Torokhov <dtor@...l.ru>,
Misael Lopez Cruz <misael.lopez@...com>,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [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@...com>
Reviewed-by: Mark Brown <broonie@...nsource.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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists