Skip to contentSkip to conversation

pxa_camera: remove init() callback

PATCH Superseded Antonio Ospite 5 participants 18 messages Nov 17, 2009 – Nov 29, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover pxa_camera: remove init() callback

Hi,

this series removes the init() callback from pxa_camera_platform_data, and fixes its users to do initialization statically at machine init time.

Guennadi requested this change because there seems to be no use cases for dynamic initialization. I also believe that the current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

So removing it is definitely good.
As a side note, If we were really exposing some dynamic and generic initialization, this could be done in soc-camera itself, not in pxa_camera anyways.

Thanks,
Antonio

Antonio Ospite (3):
em-x270: don't use pxa_camera init() callback
pcm990-baseboard: don't use pxa_camera init() callback
pxa_camera: remove init() callback

 arch/arm/mach-pxa/em-x270.c             |    9 +++++----
 arch/arm/mach-pxa/include/mach/camera.h |    2 --
 arch/arm/mach-pxa/pcm990-baseboard.c    |    8 +-------
 drivers/media/video/pxa_camera.c        |   10 ----------
 4 files changed, 6 insertions(+), 23 deletions(-)

--
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

#1 lore raw

PATCH 1/3 em-x270: don't use pxa_camera init() callback

pxa_camera init() is going to be removed.

---
 arch/arm/mach-pxa/em-x270.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/mach-pxa/em-x270.c +5 -4
index aec7f42..f71f34c 100644
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
 static struct regulator *em_x270_camera_ldo;
 
-static int em_x270_sensor_init(struct device *dev)
+static int em_x270_sensor_init(void)
 {
 	int ret;
 
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
 }
 
 struct pxacamera_platform_data em_x270_camera_platform_data = {
-	.init	= em_x270_sensor_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
 	.mclk_10khz = 2600,
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
 
 static void  __init em_x270_init_camera(void)
 {
-	pxa_set_camera_info(&em_x270_camera_platform_data);
-	platform_device_register(&em_x270_camera);
+	if (em_x270_sensor_init() == 0) {
+		pxa_set_camera_info(&em_x270_camera_platform_data);
+		platform_device_register(&em_x270_camera);
+	}
 }
 #else
 static inline void em_x270_init_camera(void) {}
Signature · 1 line
1.6.5.2
#2 lore raw

PATCH 1/3 em-x270: don't use pxa_camera init() callback

Quoted 6 lines · Antonio Ospite

pxa_camera init() is going to be removed.

---
 arch/arm/mach-pxa/em-x270.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
Quoted 34 lines
arch/arm/mach-pxa/em-x270.c +5 -4
index aec7f42..f71f34c 100644
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
 static struct regulator *em_x270_camera_ldo;
 
-static int em_x270_sensor_init(struct device *dev)
+static int em_x270_sensor_init(void)
 {
 	int ret;
 
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
 }
 
 struct pxacamera_platform_data em_x270_camera_platform_data = {
-	.init	= em_x270_sensor_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
 	.mclk_10khz = 2600,
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
 
 static void  __init em_x270_init_camera(void)
 {
-	pxa_set_camera_info(&em_x270_camera_platform_data);
-	platform_device_register(&em_x270_camera);
+	if (em_x270_sensor_init() == 0) {
+		pxa_set_camera_info(&em_x270_camera_platform_data);
+		platform_device_register(&em_x270_camera);
+	}
 }
 #else
 static inline void em_x270_init_camera(void) {}
Signature · 2 lines
Sincerely yours,
Mike.
#3 lore raw

PATCH 1/3 em-x270: don't use pxa_camera init() callback

In reply to Antonio Ospite
Quoted 1 line · Antonio Ospite

pxa_camera init() is going to be removed.

My nitpick here would be - I would put it the other way round. We do not remove .init() in platforms, because it is going to be removed, but rather we perform initialisation statically, because we think this is better so, and then .init becomes useless and gets removed.

Quoted 2 lines

Thanks
Guennadi

Quoted 41 lines
---
 arch/arm/mach-pxa/em-x270.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/mach-pxa/em-x270.c +5 -4
index aec7f42..f71f34c 100644
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
 static struct regulator *em_x270_camera_ldo;
 
-static int em_x270_sensor_init(struct device *dev)
+static int em_x270_sensor_init(void)
 {
 	int ret;
 
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
 }
 
 struct pxacamera_platform_data em_x270_camera_platform_data = {
-	.init	= em_x270_sensor_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
 	.mclk_10khz = 2600,
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
 
 static void  __init em_x270_init_camera(void)
 {
-	pxa_set_camera_info(&em_x270_camera_platform_data);
-	platform_device_register(&em_x270_camera);
+	if (em_x270_sensor_init() == 0) {
+		pxa_set_camera_info(&em_x270_camera_platform_data);
+		platform_device_register(&em_x270_camera);
+	}
 }
 #else
 static inline void em_x270_init_camera(void) {}
Signature · 1 line
1.6.5.2

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#4 lore raw

PATCH 1/3 em-x270: don't use pxa_camera init() callback

Quoted 9 lines · On Wed, 18 Nov 2009 11:10:06 +0100 (CET) Guennadi Liakhovetski…
Quoted 1 line · Antonio Ospite

pxa_camera init() is going to be removed.

My nitpick here would be - I would put it the other way round. We do not remove .init() in platforms, because it is going to be removed, but rather we perform initialisation statically, because we think this is better so, and then .init becomes useless and gets removed.

TBH, I am persuaded that the current use of init() is ambiguous /per se/ and so we'd just better not use it at all. If static initialization for sensor GPIOs is better, well I just trust you on that. However, the point here is not about static/dynamic initialization, it is more about pxa_camera init() used one time to configure MFP pins, and another time to request resources for the *sensor*, and in both cases (mis)used as it was going to be called at _module_init_ time only, which it wasn't.

So, can you see why I consider these changes (patches 1 and 2) as merely functional to the removal of init() from pxa_camera?

Anyhow, if you don't like references to a future change without an explanation I can arrange something in commit messages for the first two patches :)

Regards,
Antonio

Signature · 17 lines
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091118/d263ff16/attachment.sig>
#5 lore raw

PATCH v2 1/3 em-x270: don't use pxa_camera init() callback

In reply to Guennadi Liakhovetski

pxa_camera init() is ambiguous, it's better to statically configure the sensor.

---

The only change from previous version is the commit message, we don't want to mention .init() removal yet. Since the code is not changed the ack from Mike Rapoport still holds.

 arch/arm/mach-pxa/em-x270.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
arch/arm/mach-pxa/em-x270.c +5 -4
index aec7f42..f71f34c 100644
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
 static struct regulator *em_x270_camera_ldo;
 
-static int em_x270_sensor_init(struct device *dev)
+static int em_x270_sensor_init(void)
 {
 	int ret;
 
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
 }
 
 struct pxacamera_platform_data em_x270_camera_platform_data = {
-	.init	= em_x270_sensor_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
 	.mclk_10khz = 2600,
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
 
 static void  __init em_x270_init_camera(void)
 {
-	pxa_set_camera_info(&em_x270_camera_platform_data);
-	platform_device_register(&em_x270_camera);
+	if (em_x270_sensor_init() == 0) {
+		pxa_set_camera_info(&em_x270_camera_platform_data);
+		platform_device_register(&em_x270_camera);
+	}
 }
 #else
 static inline void em_x270_init_camera(void) {}
Signature · 1 line
1.6.5.3
#6 lore raw

PATCH 2/3 pcm990-baseboard: don't use pxa_camera init() callback

In reply to Antonio Ospite

pxa_camera init() is going to be removed. Configure PXA CIF pins directly in machine init function.

---
 arch/arm/mach-pxa/pcm990-baseboard.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/mach-pxa/pcm990-baseboard.c +1 -7
index bbda570..d5255ae 100644
@@ -359,19 +359,12 @@ static unsigned long pcm990_camera_pin_config[] = {
 	GPIO44_CIF_LV,
 };
 
-static int pcm990_pxacamera_init(struct device *dev)
-{
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
-	return 0;
-}
-
 /*
  * CICR4: PCLK_EN:	Pixel clock is supplied by the sensor
  *	MCLK_EN:	Master clock is generated by PXA
  *	PCP:		Data sampled on the falling edge of pixel clock
  */
 struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
-	.init	= pcm990_pxacamera_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
 	.mclk_10khz = 1000,
@@ -532,6 +525,7 @@ void __init pcm990_baseboard_init(void)
 	pxa_set_ac97_info(NULL);
 
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
+	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
 	pxa_set_camera_info(&pcm990_pxacamera_platform_data);
 
 	i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
Signature · 1 line
1.6.5.2
#7 lore raw

PATCH 2/3 pcm990-baseboard: don't use pxa_camera init() callback

Quoted 2 lines · Antonio Ospite

pxa_camera init() is going to be removed. Configure PXA CIF pins directly in machine init function.

Same comment as to patch 1/3.

Quoted 2 lines

Even though the change seems obvious, it better be tested - in case someone reconfigures camera pins somewhere after pcm990_baseboard_init()... Juergen, would you be able to test it?

Thanks
Guennadi

Quoted 39 lines
---
 arch/arm/mach-pxa/pcm990-baseboard.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/mach-pxa/pcm990-baseboard.c +1 -7
index bbda570..d5255ae 100644
@@ -359,19 +359,12 @@ static unsigned long pcm990_camera_pin_config[] = {
 	GPIO44_CIF_LV,
 };
 
-static int pcm990_pxacamera_init(struct device *dev)
-{
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
-	return 0;
-}
-
 /*
  * CICR4: PCLK_EN:	Pixel clock is supplied by the sensor
  *	MCLK_EN:	Master clock is generated by PXA
  *	PCP:		Data sampled on the falling edge of pixel clock
  */
 struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
-	.init	= pcm990_pxacamera_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
 	.mclk_10khz = 1000,
@@ -532,6 +525,7 @@ void __init pcm990_baseboard_init(void)
 	pxa_set_ac97_info(NULL);
 
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
+	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
 	pxa_set_camera_info(&pcm990_pxacamera_platform_data);
 
 	i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
Signature · 1 line
1.6.5.2

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#8 lore raw

PATCH 2/3 pcm990-baseboard: don't use pxa_camera init() callback

Quoted 11 lines · Guennadi Liakhovetski
Quoted 2 lines · Antonio Ospite

pxa_camera init() is going to be removed. Configure PXA CIF pins directly in machine init function.

Same comment as to patch 1/3.

Quoted 1 line

Even though the change seems obvious, it better be tested - in case someone reconfigures camera pins somewhere after pcm990_baseboard_init()... Juergen, would you be able to test it?

Lets see, if I can grab some hardware.

jbe

Signature · 4 lines
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |
#9 lore raw

PATCH v2 2/3 pcm990-baseboard: don't use pxa_camera init() callback

In reply to Guennadi Liakhovetski

pxa_camera init() is ambiguous, it's better to configure PXA CIF pins statically in machine init function.

---

The only change from previous version is the commit message, we don't want to mention .init() removal yet.

 arch/arm/mach-pxa/pcm990-baseboard.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/mach-pxa/pcm990-baseboard.c +1 -7
index bbda570..d5255ae 100644
@@ -359,19 +359,12 @@ static unsigned long pcm990_camera_pin_config[] = {
 	GPIO44_CIF_LV,
 };
 
-static int pcm990_pxacamera_init(struct device *dev)
-{
-	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
-	return 0;
-}
-
 /*
  * CICR4: PCLK_EN:	Pixel clock is supplied by the sensor
  *	MCLK_EN:	Master clock is generated by PXA
  *	PCP:		Data sampled on the falling edge of pixel clock
  */
 struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
-	.init	= pcm990_pxacamera_init,
 	.flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
 		PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
 	.mclk_10khz = 1000,
@@ -532,6 +525,7 @@ void __init pcm990_baseboard_init(void)
 	pxa_set_ac97_info(NULL);
 
 #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
+	pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
 	pxa_set_camera_info(&pcm990_pxacamera_platform_data);
 
 	i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
Signature · 1 line
1.6.5.3
#10 lore raw

PATCH v2 2/3 pcm990-baseboard: don't use pxa_camera init() callback

Quoted 4 lines · Antonio Ospite

pxa_camera init() is ambiguous, it's better to configure PXA CIF pins statically in machine init function.

I'll grab this and get it exposed to next -rc phase.

#11 lore raw

PATCH 3/3 pxa_camera: remove init() callback

In reply to Antonio Ospite

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

---
 arch/arm/mach-pxa/include/mach/camera.h |    2 --
 drivers/media/video/pxa_camera.c        |   10 ----------
 2 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-pxa/include/mach/camera.h +0 -2
index 31abe6d..6709b1c 100644
@@ -35,8 +35,6 @@
 #define PXA_CAMERA_VSP		0x400
 
 struct pxacamera_platform_data {
-	int (*init)(struct device *);
-
 	unsigned long flags;
 	unsigned long mclk_10khz;
 };
drivers/media/video/pxa_camera.c +0 -10
index 51b683c..49f2bf9 100644
@@ -882,18 +882,8 @@ static void recalculate_fifo_timeout(struct pxa_camera_dev *pcdev,
 
 static void pxa_camera_activate(struct pxa_camera_dev *pcdev)
 {
-	struct pxacamera_platform_data *pdata = pcdev->pdata;
-	struct device *dev = pcdev->soc_host.v4l2_dev.dev;
 	u32 cicr4 = 0;
 
-	dev_dbg(dev, "Registered platform device at %p data %p\n",
-		pcdev, pdata);
-
-	if (pdata && pdata->init) {
-		dev_dbg(dev, "%s: Init gpios\n", __func__);
-		pdata->init(dev);
-	}
-
 	/* disable all interrupts */
 	__raw_writel(0x3ff, pcdev->base + CICR0);
 
Signature · 1 line
1.6.5.2
#12 lore raw

PATCH 3/3 pxa_camera: remove init() callback

Quoted 10 lines · Antonio Ospite

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

Antonio, to make the merging easier and avoid imposing extra dependencies, I would postpone this to 2.6.34, and just remove uses of .init() by pxa-camera users as per your other two patches. Would this be ok with you?

Thanks
Guennadi

Quoted 44 lines
---
 arch/arm/mach-pxa/include/mach/camera.h |    2 --
 drivers/media/video/pxa_camera.c        |   10 ----------
 2 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-pxa/include/mach/camera.h +0 -2
index 31abe6d..6709b1c 100644
@@ -35,8 +35,6 @@
 #define PXA_CAMERA_VSP		0x400
 
 struct pxacamera_platform_data {
-	int (*init)(struct device *);
-
 	unsigned long flags;
 	unsigned long mclk_10khz;
 };
drivers/media/video/pxa_camera.c +0 -10
index 51b683c..49f2bf9 100644
@@ -882,18 +882,8 @@ static void recalculate_fifo_timeout(struct pxa_camera_dev *pcdev,
 
 static void pxa_camera_activate(struct pxa_camera_dev *pcdev)
 {
-	struct pxacamera_platform_data *pdata = pcdev->pdata;
-	struct device *dev = pcdev->soc_host.v4l2_dev.dev;
 	u32 cicr4 = 0;
 
-	dev_dbg(dev, "Registered platform device at %p data %p\n",
-		pcdev, pdata);
-
-	if (pdata && pdata->init) {
-		dev_dbg(dev, "%s: Init gpios\n", __func__);
-		pdata->init(dev);
-	}
-
 	/* disable all interrupts */
 	__raw_writel(0x3ff, pcdev->base + CICR0);
 
Signature · 1 line
1.6.5.2

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#13 lore raw

PATCH 3/3 pxa_camera: remove init() callback

Quoted 11 lines · On Fri, 27 Nov 2009 15:06:53 +0100 (CET) Guennadi Liakhovetski…
Quoted 9 lines · Antonio Ospite

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

Quoted 9 lines
Quoted 1 line

Antonio, to make the merging easier and avoid imposing extra dependencies, I would postpone this to 2.6.34, and just remove uses of .init() by pxa-camera users as per your other two patches. Would this be ok with you?

Thanks
Guennadi

Perfectly fine with me.

Feel also free to anticipate me and edit the commit messages to whatever you want in the first two patches. Now that we aren't removing init() immediately after these it makes even more sense to change the phrasing from a future referencing
"init() is going to be removed"
to a more present focused
"better not to use init() at all"
form.

Thanks,
Antonio

Signature · 17 lines
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/d6e71e8d/attachment.sig>
#14 lore raw

PATCH 3/3 pxa_camera: remove init() callback

Quoted 26 lines · Antonio Ospite
Quoted 11 lines · On Fri, 27 Nov 2009 15:06:53 +0100 (CET) Guennadi Liakhovetski…
Quoted 9 lines · Antonio Ospite

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

Quoted 9 lines
Quoted 1 line

Antonio, to make the merging easier and avoid imposing extra dependencies, I would postpone this to 2.6.34, and just remove uses of .init() by pxa-camera users as per your other two patches. Would this be ok with you?

Thanks
Guennadi

Perfectly fine with me.

Quoted 8 lines

Feel also free to anticipate me and edit the commit messages to whatever you want in the first two patches. Now that we aren't removing init() immediately after these it makes even more sense to change the phrasing from a future referencing
"init() is going to be removed"
to a more present focused
"better not to use init() at all"
form.

I cannot edit those subject lines, because I will not be handling those patches, they will go via the PXA tree, that's why it is easier to wait with the pxa patch.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#15 lore raw

PATCH 3/3 pxa_camera: remove init() callback

Quoted 37 lines · On Fri, 27 Nov 2009 15:37:19 +0100 (CET) Guennadi Liakhovetski…
Quoted 26 lines · Antonio Ospite
Quoted 11 lines · On Fri, 27 Nov 2009 15:06:53 +0100 (CET) Guennadi Liakhovetski…
Quoted 9 lines · Antonio Ospite

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or even to request GPIOs to be used by the camera *sensor*. These initializations can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is invoked in pxa_camera_activate(), hence at device node open, but its users use it like a generic initialization to be done at module init time (configure MFP, request GPIOs for *sensor* control).

Quoted 9 lines
Quoted 1 line

Antonio, to make the merging easier and avoid imposing extra dependencies, I would postpone this to 2.6.34, and just remove uses of .init() by pxa-camera users as per your other two patches. Would this be ok with you?

Thanks
Guennadi

Perfectly fine with me.

Quoted 8 lines

Feel also free to anticipate me and edit the commit messages to whatever you want in the first two patches. Now that we aren't removing init() immediately after these it makes even more sense to change the phrasing from a future referencing
"init() is going to be removed"
to a more present focused
"better not to use init() at all"
form.

Quoted 4 lines

I cannot edit those subject lines, because I will not be handling those patches, they will go via the PXA tree, that's why it is easier to wait with the pxa patch.

I see, I am sending a v2 for the first two patches with changed commit messages in some hours then. Sorry for the delay.

Quoted 6 lines

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

Regards,
Antonio

Signature · 17 lines
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/172f15ac/attachment.sig>
#16 lore raw

cover pxa_camera: remove init() callback

In reply to Antonio Ospite
Quoted 5 lines · On Tue, 17 Nov 2009 23:04:20 +0100 Antonio Ospite <[email protected]>…

Hi,

this series removes the init() callback from pxa_camera_platform_data, and fixes its users to do initialization statically at machine init time.

[...]

Quoted 3 lines

Antonio Ospite (3):
em-x270: don't use pxa_camera init() callback
pcm990-baseboard: don't use pxa_camera init() callback

Eric, if Guennadi ACKs v2 for these two please apply them only, we are postponing the third one, hence you can discard it.

Quoted 2 lines

pxa_camera: remove init() callback

Thanks,
Antonio

Signature · 17 lines
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/23d5141f/attachment.sig>
#17 lore raw

cover pxa_camera: remove init() callback

Quoted 8 lines · Antonio Ospite
Quoted 5 lines · On Tue, 17 Nov 2009 23:04:20 +0100 Antonio Ospite <[email protected]>…

Hi,

this series removes the init() callback from pxa_camera_platform_data, and fixes its users to do initialization statically at machine init time.

Quoted 8 lines

[...]

Quoted 3 lines

Antonio Ospite (3):
? em-x270: don't use pxa_camera init() callback ? pcm990-baseboard: don't use pxa_camera init() callback

Eric, if Guennadi ACKs v2 for these two please apply them only, we are postponing the third one, hence you can discard it.

OK, fine.