linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: staging/dream: add gpio and pmem support
Date: Wed, 28 Oct 2009 00:25:22 +0100	[thread overview]
Message-ID: <20091027232521.GA16782@elf.ucw.cz> (raw)
In-Reply-To: <20091027204445.GA28878@kroah.com>

Hi!

> > What is so wrong with wakelocks? They are just nops in this case.
> 
> Are they really?  Then why is the whole large file needed?

It is probably not, I went to "submit vendor code, then clean it up"
mode. CONFIG_HAS_WAKELOCK should be disabled, so it basically stubs
itself out.

> > 2) you submit it
> 
> Wait, it has to BUILD!  This code has never been able to be built.  Only
> after I disabled it from the CONFIG_ANDROID have I noticed this, which
> is my fault.  But it needs to get fixed, and taking a bunch of code in
> addition to the mess we have now, seems like the wrong way to do it.

It seems to be the only reasonable way. gpio is used from all the
other stuff, and removing it is not really an option.

> > Now, I see that wakelocks are show-stopper for merging into kernel
> > proper, but what is the problem for staging? We merged drivers with
> > OS_MEMORY_ALLOCATE(); wakelocks are just nops in this case.
> > 
> > Could we please clean this driver in-tree? (Wakelocks are already nops
> > due to #ifdef magic, cleaning them incrementally is easy.)
> 
> With this patch, will it build properly?

Its certainly way closer to building... it builds for me, with
something like below; platform devices really are initialized from
board-* files and get passed parameters.

I should get some sleep now, I'll take closer look tommorow.

									Pavel

diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index 264d62e..9e68db2 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -35,4 +61,50 @@ void __init msm_init_irq(void);
 void __init msm_init_gpio(void);
 void __init msm_clock_init(void);
 
+struct msm_camera_io_ext {
+	uint32_t mdcphy;
+	uint32_t mdcsz;
+	uint32_t appphy;
+	uint32_t appsz;
+};
+
+struct msm_camera_device_platform_data {
+	void (*camera_gpio_on) (void);
+	void (*camera_gpio_off)(void);
+	struct msm_camera_io_ext ioext;
+};
+
+#ifdef CONFIG_SENSORS_MT9T013
+struct msm_camera_legacy_device_platform_data {
+	int sensor_reset;
+	int sensor_pwd;
+	int vcm_pwd;
+	void (*config_gpio_on) (void);
+	void (*config_gpio_off)(void);
+};
+#endif
+
+#define MSM_CAMERA_FLASH_NONE 0
+#define MSM_CAMERA_FLASH_LED  1
+
+struct msm_camera_sensor_info {
+	const char *sensor_name;
+	int sensor_reset;
+	int sensor_pwd;
+	int vcm_pwd;
+	int mclk;
+	int flash_type;
+	struct msm_camera_device_platform_data *pdata;
+};
+
+struct snd_endpoint {
+	int id;
+	const char *name;
+};
+
+struct msm_snd_endpoints {
+	struct snd_endpoint *endpoints;
+	unsigned num;
+};
+
 #endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index 2f7b4c8..8b88e4a 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -116,6 +116,7 @@
 
 #define MSM_AD5_PHYS          0xAC000000
 #define MSM_AD5_SIZE          (SZ_1M*13)
+#define MSM_AD5_BASE          IOMEM(0xE0300000)
 
 
 #endif


									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2009-10-27 23:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22  9:13 staging/dream: add gpio and pmem support Pavel Machek
2009-10-26 23:43 ` Greg KH
2009-10-27  0:17   ` Pavel Machek
2009-10-27  3:00     ` Greg KH
2009-10-27  8:19       ` Pavel Machek
2009-10-27 16:57         ` Greg KH
2009-10-27 19:33           ` Pavel Machek
2009-10-27 20:44             ` Greg KH
2009-10-27 23:25               ` Pavel Machek [this message]
2009-10-28 15:51                 ` Greg KH
2009-10-28 21:56                   ` Pavel Machek
2009-10-28 22:11                     ` Greg KH
2009-10-28 22:41                       ` Pavel Machek
2009-10-27 22:03             ` Brian Swetland
2009-10-28 21:22               ` Pavel Machek
2009-10-28  8:59 ` Paulius Zaleckas
2009-10-28  9:05   ` Pavel Machek

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=20091027232521.GA16782@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).