mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
97 lines
3.1 KiB
Diff
97 lines
3.1 KiB
Diff
From 4ce0847967d665791ef9a55886f0aca9c324c63f Mon Sep 17 00:00:00 2001
|
|
From: Naushir Patuck <naush@raspberrypi.com>
|
|
Date: Fri, 31 Mar 2023 15:05:33 +0100
|
|
Subject: [PATCH 0435/1085] drivers: media: imx708: Follow the standard
|
|
devicetree labels
|
|
|
|
Switch the system clock name from "xclk" to "inclk".
|
|
Use lower case lables for all regulator names.
|
|
|
|
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
|
|
---
|
|
drivers/media/i2c/imx708.c | 36 ++++++++++++++++++------------------
|
|
1 file changed, 18 insertions(+), 18 deletions(-)
|
|
|
|
--- a/drivers/media/i2c/imx708.c
|
|
+++ b/drivers/media/i2c/imx708.c
|
|
@@ -33,7 +33,7 @@
|
|
|
|
#define IMX708_REG_ORIENTATION 0x101
|
|
|
|
-#define IMX708_XCLK_FREQ 24000000
|
|
+#define IMX708_INCLK_FREQ 24000000
|
|
|
|
/* Default initial pixel rate, will get updated for each mode. */
|
|
#define IMX708_INITIAL_PIXEL_RATE 590000000
|
|
@@ -786,10 +786,10 @@ static const int imx708_test_pattern_val
|
|
/* regulator supplies */
|
|
static const char * const imx708_supply_name[] = {
|
|
/* Supplies can be enabled in any order */
|
|
- "VANA1", /* Analog1 (2.8V) supply */
|
|
- "VANA2", /* Analog2 (1.8V) supply */
|
|
- "VDIG", /* Digital Core (1.1V) supply */
|
|
- "VDDL", /* IF (1.8V) supply */
|
|
+ "vana1", /* Analog1 (2.8V) supply */
|
|
+ "vana2", /* Analog2 (1.8V) supply */
|
|
+ "vdig", /* Digital Core (1.1V) supply */
|
|
+ "vddl", /* IF (1.8V) supply */
|
|
};
|
|
|
|
/*
|
|
@@ -809,8 +809,8 @@ struct imx708 {
|
|
|
|
struct v4l2_mbus_framefmt fmt;
|
|
|
|
- struct clk *xclk;
|
|
- u32 xclk_freq;
|
|
+ struct clk *inclk;
|
|
+ u32 inclk_freq;
|
|
|
|
struct gpio_desc *reset_gpio;
|
|
struct regulator_bulk_data supplies[ARRAY_SIZE(imx708_supply_name)];
|
|
@@ -1602,7 +1602,7 @@ static int imx708_power_on(struct device
|
|
return ret;
|
|
}
|
|
|
|
- ret = clk_prepare_enable(imx708->xclk);
|
|
+ ret = clk_prepare_enable(imx708->inclk);
|
|
if (ret) {
|
|
dev_err(&client->dev, "%s: failed to enable clock\n",
|
|
__func__);
|
|
@@ -1630,7 +1630,7 @@ static int imx708_power_off(struct devic
|
|
gpiod_set_value_cansleep(imx708->reset_gpio, 0);
|
|
regulator_bulk_disable(ARRAY_SIZE(imx708_supply_name),
|
|
imx708->supplies);
|
|
- clk_disable_unprepare(imx708->xclk);
|
|
+ clk_disable_unprepare(imx708->inclk);
|
|
|
|
/* Force reprogramming of the common registers when powered up again. */
|
|
imx708->common_regs_written = false;
|
|
@@ -1951,17 +1951,17 @@ static int imx708_probe(struct i2c_clien
|
|
if (imx708_check_hwcfg(dev, imx708))
|
|
return -EINVAL;
|
|
|
|
- /* Get system clock (xclk) */
|
|
- imx708->xclk = devm_clk_get(dev, NULL);
|
|
- if (IS_ERR(imx708->xclk))
|
|
- return dev_err_probe(dev, PTR_ERR(imx708->xclk),
|
|
- "failed to get xclk\n");
|
|
+ /* Get system clock (inclk) */
|
|
+ imx708->inclk = devm_clk_get(dev, "inclk");
|
|
+ if (IS_ERR(imx708->inclk))
|
|
+ return dev_err_probe(dev, PTR_ERR(imx708->inclk),
|
|
+ "failed to get inclk\n");
|
|
|
|
- imx708->xclk_freq = clk_get_rate(imx708->xclk);
|
|
- if (imx708->xclk_freq != IMX708_XCLK_FREQ)
|
|
+ imx708->inclk_freq = clk_get_rate(imx708->inclk);
|
|
+ if (imx708->inclk_freq != IMX708_INCLK_FREQ)
|
|
return dev_err_probe(dev, -EINVAL,
|
|
- "xclk frequency not supported: %d Hz\n",
|
|
- imx708->xclk_freq);
|
|
+ "inclk frequency not supported: %d Hz\n",
|
|
+ imx708->inclk_freq);
|
|
|
|
ret = imx708_get_regulators(imx708);
|
|
if (ret)
|