LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
linux-kernel <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [UPDATED v3][PATCH 4/7] regulator: framework core
Date: Fri, 7 Mar 2008 08:10:12 -0800 [thread overview]
Message-ID: <20080307161012.GC28439@kroah.com> (raw)
In-Reply-To: <1204827115.15360.150.camel@a10323.wolfsonmicro.main>
On Thu, Mar 06, 2008 at 06:11:54PM +0000, Liam Girdwood wrote:
> This patch provides the regulator framework core. The core also provides a
> sysfs interface for userspace information.
>
> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/reg-core.c | 1311 ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 1311 insertions(+), 0 deletions(-)
> create mode 100644 drivers/regulator/reg-core.c
>
> diff --git a/drivers/regulator/reg-core.c b/drivers/regulator/reg-core.c
> new file mode 100644
> index 0000000..56367ab
> --- /dev/null
> +++ b/drivers/regulator/reg-core.c
> @@ -0,0 +1,1311 @@
> +/*
> + * regulator.c -- Voltage/Current Regulator framework.
> + *
> + * Copyright 2007, 2008 Wolfson Microelectronics PLC.
> + *
> + * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + *
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/device.h>
> +#include <linux/err.h>
> +#include <linux/mutex.h>
> +#include <linux/regulator/regulator.h>
> +#include <linux/regulator/regulator-drv.h>
> +#include <linux/regulator/regulator-platform.h>
> +
> +#define REGULATOR_VERSION "0.4"
> +
> +static DEFINE_MUTEX(regulator_list_mutex);
> +static LIST_HEAD(regulator_list);
> +
> +/**
> + * struct regulator_cdev
> + *
> + * Voltage / Current regulator class device. One for each regulator.
> + */
> +struct regulator_cdev {
> + struct regulator_desc *desc;
> + int use_count;
> +
> + struct list_head list;
> + struct list_head consumer_list;
> + struct blocking_notifier_head notifier;
> + struct mutex mutex; /* consumer lock */
> + struct module *owner;
> + struct class_device cdev;
Can you change this to use a "struct device" instead? We are trying to
get rid of class_device, and there are only 3 users of it in the kernel
today (memorystick, infiniband, and scsi), and I have patches pending to
fix all of these. For 2.6.26 I would like to be rid of it finally.
If you want, I would be glad to fix this up for you, it should be a
pretty simple replacement.
> + struct regulation_constraints *constraints;
> + struct regulator_cdev *parent; /* for tree */
And if when you convert, you can get rid of this pointer, it would not
be needed.
> + void *reg_data; /* regulator_cdev data */
Nor would this one. Actually I don't think you need this one today
anyway...
thanks,
greg k-h
next prev parent reply other threads:[~2008-03-07 16:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 18:11 Liam Girdwood
2008-03-07 8:39 ` Andrew Morton
2008-03-08 17:24 ` Liam Girdwood
2008-03-08 18:30 ` Andrew Morton
2008-03-09 11:18 ` Liam Girdwood
2008-03-07 16:10 ` Greg KH [this message]
2008-03-07 22:19 ` Liam Girdwood
2008-03-08 7:41 ` Greg KH
2008-03-08 21:18 ` Liam Girdwood
2008-03-09 3:16 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080307161012.GC28439@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lg@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [UPDATED v3][PATCH 4/7] regulator: framework core' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).