From: "Juha Yrjölä" <juha.yrjola@nokia.com>
To: ext Komal Shah <komal_shah802003@yahoo.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] OMAP: MMC: Move set_power to platform data
Date: Sat, 4 Mar 2006 12:36:06 +0200 [thread overview]
Message-ID: <20060304103606.GA16761@two.research.nokia.com> (raw)
In-Reply-To: <20060303132421.46104.qmail@web32909.mail.mud.yahoo.com>
On Fri, Mar 03, 2006 at 05:24:21AM -0800, ext Komal Shah wrote:
> #include "omap.h"
> @@ -102,6 +100,7 @@ struct mmc_omap_host {
> struct work_struct switch_work;
> struct timer_list switch_timer;
> int switch_last_state;
> + void (*set_power)(void __iomem *base, int on);
> };
Note that just "on" is not enough; some power supplies have support for
setting the voltage to several different values.
> diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
> index 6d6240a..168662f 100644
> --- a/include/asm-arm/arch-omap/board.h
> +++ b/include/asm-arm/arch-omap/board.h
> @@ -46,6 +46,7 @@ struct omap_mmc_conf {
> s16 power_pin;
> s16 switch_pin;
> s16 wp_pin;
> + void (*set_power)(void __iomem *base, int on);
> };
You shouldn't use the struct in board.h for this. It is meant for passing
data from the bootloader, and passing a kernel function pointer from the
bootloader is problematic, to say the least. =)
The proper way to solve this is to introde the concept of a voltage framework,
so that we can reference voltages by name instead of a function.
Cheers,
Juha
prev parent reply other threads:[~2006-03-04 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-03 13:24 [PATCH] OMAP: MMC: Move set_power to platform data Komal Shah
2006-03-03 20:47 ` Tony Lindgren
2006-03-04 10:36 ` Juha Yrjölä [this message]
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=20060304103606.GA16761@two.research.nokia.com \
--to=juha.yrjola@nokia.com \
--cc=komal_shah802003@yahoo.com \
--cc=linux-omap-open-source@linux.omap.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox