diff mbox series

[v2,2/4] media: sunxi: sun6i-csi: Move the sun6i_csi_dev structure to the common header

Message ID 20200828131737.12483-3-kevin.lhopital@bootlin.com (mailing list archive)
State New, archived
Headers show
Series Support of MIPI CSI-2 for A83T | expand

Commit Message

Kévin L'hôpital Aug. 28, 2020, 1:17 p.m. UTC
Access to the sun6i_csi_dev structure is needed to add the
MIPI CSI2 support.

Signed-off-by: Kévin L'hôpital <kevin.lhopital@bootlin.com>
---
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 12 ------------
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 12 ++++++++++++
 2 files changed, 12 insertions(+), 12 deletions(-)

Comments

Sakari Ailus Aug. 31, 2020, 10:48 a.m. UTC | #1
Hi Kévin,

On Fri, Aug 28, 2020 at 03:17:34PM +0200, Kévin L'hôpital wrote:
> Access to the sun6i_csi_dev structure is needed to add the
> MIPI CSI2 support.
> 
> Signed-off-by: Kévin L'hôpital <kevin.lhopital@bootlin.com>
> ---
>  drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 12 ------------
>  drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 12 ++++++++++++
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> index 055eb0b8e396..680fa31f380a 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> @@ -29,18 +29,6 @@
>  
>  #define MODULE_NAME	"sun6i-csi"
>  
> -struct sun6i_csi_dev {
> -	struct sun6i_csi		csi;
> -	struct device			*dev;
> -
> -	struct regmap			*regmap;
> -	struct clk			*clk_mod;
> -	struct clk			*clk_ram;
> -	struct reset_control		*rstc_bus;
> -
> -	int				planar_offset[3];
> -};
> -
>  static inline struct sun6i_csi_dev *sun6i_csi_to_dev(struct sun6i_csi *csi)
>  {
>  	return container_of(csi, struct sun6i_csi_dev, csi);
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> index 8b83d15de0d0..c4a87bdab8c3 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> @@ -48,6 +48,18 @@ struct sun6i_csi {
>  	struct sun6i_video		video;
>  };
>  
> +struct sun6i_csi_dev {
> +	struct sun6i_csi	csi;
> +	struct device		*dev;
> +	struct regmap		*regmap;
> +	struct clk		*clk_mod;
> +	struct clk		*clk_ram;
> +	struct clk		*clk_mipi;
> +	struct clk		*clk_misc;

This patch adds two more clocks, please add them when you need them. I
think you could also squash the patch to another one that requires the
struct in the header.

> +	struct reset_control	*rstc_bus;
> +	int			planar_offset[3];
> +};
> +
>  /**
>   * sun6i_csi_is_format_supported() - check if the format supported by csi
>   * @csi:	pointer to the csi
diff mbox series

Patch

diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index 055eb0b8e396..680fa31f380a 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -29,18 +29,6 @@ 
 
 #define MODULE_NAME	"sun6i-csi"
 
-struct sun6i_csi_dev {
-	struct sun6i_csi		csi;
-	struct device			*dev;
-
-	struct regmap			*regmap;
-	struct clk			*clk_mod;
-	struct clk			*clk_ram;
-	struct reset_control		*rstc_bus;
-
-	int				planar_offset[3];
-};
-
 static inline struct sun6i_csi_dev *sun6i_csi_to_dev(struct sun6i_csi *csi)
 {
 	return container_of(csi, struct sun6i_csi_dev, csi);
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
index 8b83d15de0d0..c4a87bdab8c3 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
@@ -48,6 +48,18 @@  struct sun6i_csi {
 	struct sun6i_video		video;
 };
 
+struct sun6i_csi_dev {
+	struct sun6i_csi	csi;
+	struct device		*dev;
+	struct regmap		*regmap;
+	struct clk		*clk_mod;
+	struct clk		*clk_ram;
+	struct clk		*clk_mipi;
+	struct clk		*clk_misc;
+	struct reset_control	*rstc_bus;
+	int			planar_offset[3];
+};
+
 /**
  * sun6i_csi_is_format_supported() - check if the format supported by csi
  * @csi:	pointer to the csi