linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 11/13] gpio-switch is for some reason neccessary for camera to work.
@ 2017-02-14 13:40 Pavel Machek
  2017-07-17 22:20 ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2017-02-14 13:40 UTC (permalink / raw)
  To: sakari.ailus
  Cc: sre, pali.rohar, pavel, linux-media, linux-kernel,
	laurent.pinchart, mchehab, ivo.g.dimitrov.75

[-- Attachment #1: Type: text/plain, Size: 2317 bytes --]

Probably something fun happening in userspace.
---
 arch/arm/mach-omap2/Makefile                 |  1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c | 51 ++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 arch/arm/mach-omap2/board-rx51-peripherals.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4698940..d536b1a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -229,6 +229,7 @@ obj-$(CONFIG_SOC_OMAP2420)		+= msdi.o
 # Specific board support
 obj-$(CONFIG_MACH_OMAP_GENERIC)		+= board-generic.o pdata-quirks.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)		+= board-n8x0.o
+obj-y					+= board-rx51-peripherals.o
 
 # Platform specific device init code
 
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
new file mode 100644
index 0000000..641c2be
--- /dev/null
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -0,0 +1,51 @@
+/*
+ * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
+ *
+ * Copyright (C) 2008-2009 Nokia
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/gpio/machine.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/timer.h>
+
+static struct platform_driver gpio_sw_driver = {
+	.driver		= {
+		.name	= "gpio-switch",
+	},
+};
+
+static int __init gpio_sw_init(void)
+{
+	int r;
+
+	printk(KERN_INFO "OMAP GPIO switch handler initializing\n");
+
+	r = platform_driver_register(&gpio_sw_driver);
+	if (r)
+		return r;
+
+	platform_device_register_simple("gpio-switch",
+							       -1, NULL, 0);
+	return 0;
+}
+
+static void __exit gpio_sw_exit(void)
+{
+}
+
+#ifndef MODULE
+late_initcall(gpio_sw_init);
+#else
+module_init(gpio_sw_init);
+#endif
+module_exit(gpio_sw_exit);
-- 
2.1.4


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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC 11/13] gpio-switch is for some reason neccessary for camera to work.
  2017-02-14 13:40 [RFC 11/13] gpio-switch is for some reason neccessary for camera to work Pavel Machek
@ 2017-07-17 22:20 ` Sakari Ailus
  2017-07-18  9:27   ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2017-07-17 22:20 UTC (permalink / raw)
  To: Pavel Machek
  Cc: sre, pali.rohar, linux-media, linux-kernel, laurent.pinchart,
	mchehab, ivo.g.dimitrov.75

Hi Pavel,

On Tue, Feb 14, 2017 at 02:40:19PM +0100, Pavel Machek wrote:
> Probably something fun happening in userspace.

What's the status of this one?

I don't think it has a chance to be merged in the foreseeable future. Why
is it needed?

> ---
>  arch/arm/mach-omap2/Makefile                 |  1 +
>  arch/arm/mach-omap2/board-rx51-peripherals.c | 51 ++++++++++++++++++++++++++++
>  2 files changed, 52 insertions(+)
>  create mode 100644 arch/arm/mach-omap2/board-rx51-peripherals.c
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4698940..d536b1a 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -229,6 +229,7 @@ obj-$(CONFIG_SOC_OMAP2420)		+= msdi.o
>  # Specific board support
>  obj-$(CONFIG_MACH_OMAP_GENERIC)		+= board-generic.o pdata-quirks.o
>  obj-$(CONFIG_MACH_NOKIA_N8X0)		+= board-n8x0.o
> +obj-y					+= board-rx51-peripherals.o
>  
>  # Platform specific device init code
>  
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
> new file mode 100644
> index 0000000..641c2be
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -0,0 +1,51 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
> + *
> + * Copyright (C) 2008-2009 Nokia
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/gpio_keys.h>
> +#include <linux/gpio/machine.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/timer.h>
> +
> +static struct platform_driver gpio_sw_driver = {
> +	.driver		= {
> +		.name	= "gpio-switch",
> +	},
> +};
> +
> +static int __init gpio_sw_init(void)
> +{
> +	int r;
> +
> +	printk(KERN_INFO "OMAP GPIO switch handler initializing\n");
> +
> +	r = platform_driver_register(&gpio_sw_driver);
> +	if (r)
> +		return r;
> +
> +	platform_device_register_simple("gpio-switch",
> +							       -1, NULL, 0);
> +	return 0;
> +}
> +
> +static void __exit gpio_sw_exit(void)
> +{
> +}
> +
> +#ifndef MODULE
> +late_initcall(gpio_sw_init);
> +#else
> +module_init(gpio_sw_init);
> +#endif
> +module_exit(gpio_sw_exit);
> -- 
> 2.1.4

-- 
Regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 11/13] gpio-switch is for some reason neccessary for camera to work.
  2017-07-17 22:20 ` Sakari Ailus
@ 2017-07-18  9:27   ` Pavel Machek
  2017-07-18 10:02     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2017-07-18  9:27 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: sre, pali.rohar, linux-media, linux-kernel, laurent.pinchart,
	mchehab, ivo.g.dimitrov.75

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Hi!

> On Tue, Feb 14, 2017 at 02:40:19PM +0100, Pavel Machek wrote:
> > Probably something fun happening in userspace.
> 
> What's the status of this one?
> 
> I don't think it has a chance to be merged in the foreseeable future. Why
> is it needed?

Good question. And agreed that this one is not for merging. I suspect
something in my userspace depends on gpio-switch device being
present.

I'll try to debug what is going on there once more.

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 11/13] gpio-switch is for some reason neccessary for camera to work.
  2017-07-18  9:27   ` Pavel Machek
@ 2017-07-18 10:02     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2017-07-18 10:02 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: sre, pali.rohar, linux-media, linux-kernel, laurent.pinchart,
	mchehab, ivo.g.dimitrov.75

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Tue 2017-07-18 11:27:53, Pavel Machek wrote:
> Hi!
> 
> > On Tue, Feb 14, 2017 at 02:40:19PM +0100, Pavel Machek wrote:
> > > Probably something fun happening in userspace.
> > 
> > What's the status of this one?
> > 
> > I don't think it has a chance to be merged in the foreseeable future. Why
> > is it needed?
> 
> Good question. And agreed that this one is not for merging. I suspect
> something in my userspace depends on gpio-switch device being
> present.
> 
> I'll try to debug what is going on there once more.

I tried with current userspace, and to my surprise, both sdlcam and
fcam-dev seem to work now. We can forget about this one.

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-18 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 13:40 [RFC 11/13] gpio-switch is for some reason neccessary for camera to work Pavel Machek
2017-07-17 22:20 ` Sakari Ailus
2017-07-18  9:27   ` Pavel Machek
2017-07-18 10:02     ` Pavel Machek

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).