mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Merge commit 'df0794fc5804ad714e070fb077a433119cd72047'
* commit 'df0794fc5804ad714e070fb077a433119cd72047': spi: rockchip-flexbus-spi: Fix build warning for !PM_SLEEP drm/rockchip: Fix post csc rgb2rgb matrix arm64: dts: rockchip: add can nodes for rk3562 net: can: rockchip: add rk3562 can driver input: touchscreen: parade: Fix build error for !PM_SLEEP input: touchscreen: ft5726: Fix build warning for !PM_SLEEP input: touchscreen: cyttsp5: Fix build error for !PM_SLEEP drm/rockchip: dw-dp: Fix build warning for !PM_SLEEP drm/rockchip: dw_hdmi: Fix build warning for !PM_SLEEP mmc: sdhci-of-dwcmshc: Fix build warning for !PM_SLEEP power: supply: rk817_battery: Fix build warning for !PM_SLEEP soc: rockchip: pm_config: ROCKCHIP_SUSPEND_MODE depends on SUSPEND Change-Id: Ibdbadf8afd28b0ca24c0031502807bbcabec45fc
This commit is contained in:
33
Documentation/devicetree/bindings/net/can/rk3562_can.txt
Normal file
33
Documentation/devicetree/bindings/net/can/rk3562_can.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
Rockchip CANFD controller Device Tree Bindings
|
||||
---------------------------------------------------------
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be:
|
||||
- "rockchip,rk3562-can" for RK3562 CAN controllers 3.0
|
||||
- "rockchip,rk3562-canfd" for RK3562 CANFD controllers 3.0
|
||||
- reg : Physical base address and size of the controller
|
||||
registers map.
|
||||
- interrupts : Property with a value describing the interrupt
|
||||
number.
|
||||
- clock-names : List of input clock names
|
||||
- "can_clk", "pclk",
|
||||
(See clock bindings for details).
|
||||
- clocks : Clock phandles (see clock bindings for details).
|
||||
- resets : Must contain an entry for each entry in reset-names.
|
||||
See ../reset/reset.txt for details.
|
||||
- reset-names : List of input reset names
|
||||
- "can", "can-apb".
|
||||
|
||||
Example:
|
||||
|
||||
For Dts file:
|
||||
can0: can0@ff600000 {
|
||||
compatible = "rockchip,rk3562-can";
|
||||
reg = <0x0 0xff600000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru CLK_CAN0>, <&cru PCLK_CAN0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
resets = <&cru SRST_CAN0>, <&cru SRST_P_CAN0>;
|
||||
reset-names = "can", "can-apb";
|
||||
status = "okay";
|
||||
};
|
||||
@@ -2195,6 +2195,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
can0: can@ff600000 {
|
||||
compatible = "rockchip,rk3562-can";
|
||||
reg = <0x0 0xff600000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru CLK_CAN0>, <&cru PCLK_CAN0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
resets = <&cru SRST_CAN0>, <&cru SRST_P_CAN0>;
|
||||
reset-names = "can", "can-apb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
can1: can@ff610000 {
|
||||
compatible = "rockchip,rk3562-can";
|
||||
reg = <0x0 0xff610000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru CLK_CAN1>, <&cru PCLK_CAN1>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
resets = <&cru SRST_CAN1>, <&cru SRST_P_CAN1>;
|
||||
reset-names = "can", "can-apb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi1: spi@ff640000 {
|
||||
compatible = "rockchip,rk3066-spi";
|
||||
reg = <0x0 0xff640000 0x0 0x1000>;
|
||||
|
||||
@@ -5997,9 +5997,9 @@ static int dw_dp_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops dw_dp_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(dw_dp_runtime_suspend, dw_dp_runtime_resume, NULL)
|
||||
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(dw_dp_suspend_noirq, dw_dp_resume_noirq)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(dw_dp_suspend, dw_dp_resume)
|
||||
RUNTIME_PM_OPS(dw_dp_runtime_suspend, dw_dp_runtime_resume, NULL)
|
||||
NOIRQ_SYSTEM_SLEEP_PM_OPS(dw_dp_suspend_noirq, dw_dp_resume_noirq)
|
||||
SYSTEM_SLEEP_PM_OPS(dw_dp_suspend, dw_dp_resume)
|
||||
};
|
||||
|
||||
static const struct dw_dp_chip_data rk3588_dp[] = {
|
||||
@@ -6058,6 +6058,6 @@ struct platform_driver dw_dp_driver = {
|
||||
.driver = {
|
||||
.name = "dw-dp",
|
||||
.of_match_table = dw_dp_of_match,
|
||||
.pm = &dw_dp_pm_ops,
|
||||
.pm = pm_ptr(&dw_dp_pm_ops),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4571,7 +4571,7 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dw_hdmi_rockchip_suspend(struct device *dev)
|
||||
static int __maybe_unused dw_hdmi_rockchip_suspend(struct device *dev)
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
@@ -4589,7 +4589,7 @@ static int dw_hdmi_rockchip_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dw_hdmi_rockchip_resume(struct device *dev)
|
||||
static int __maybe_unused dw_hdmi_rockchip_resume(struct device *dev)
|
||||
{
|
||||
struct rockchip_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
|
||||
@@ -1006,17 +1006,17 @@ static const struct rk_pq_csc_coef y2r_for_y2y = {
|
||||
};
|
||||
|
||||
static const struct rk_pq_csc_coef r2y_for_r2r = {
|
||||
1024, 0, 1612,
|
||||
1024, -192, -480,
|
||||
1024, 1900, -2,
|
||||
};
|
||||
|
||||
static const struct rk_pq_csc_coef y2r_for_r2r = {
|
||||
218, 732, 74,
|
||||
-117, -395, 512,
|
||||
512, -465, -47,
|
||||
};
|
||||
|
||||
static const struct rk_pq_csc_coef y2r_for_r2r = {
|
||||
1024, 0, 1612,
|
||||
1024, -192, -480,
|
||||
1024, 1900, -2,
|
||||
};
|
||||
|
||||
static const struct rk_pq_csc_coef rgb_input_swap_matrix = {
|
||||
0, 0, 1,
|
||||
1, 0, 0,
|
||||
|
||||
@@ -4856,6 +4856,7 @@ static int cyttsp5_core_resume(struct device *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int cyttsp5_core_early_suspend(struct tp_device *tp_d)
|
||||
{
|
||||
@@ -4896,7 +4897,6 @@ static int cyttsp5_core_late_resume(struct tp_device *tp_d)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NEED_SUSPEND_NOTIFIER
|
||||
static int cyttsp5_pm_notifier(struct notifier_block *nb,
|
||||
|
||||
@@ -2108,7 +2108,7 @@ static int fts_core_pm_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
const struct dev_pm_ops fts_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(fts_core_pm_suspend, fts_core_pm_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(fts_core_pm_suspend, fts_core_pm_resume)
|
||||
//SET_RUNTIME_PM_OPS(fts_core_rt_suspend, fts_core_rt_resume,NULL)
|
||||
//.suspend = fts_core_pm_suspend,
|
||||
// .resume = fts_core_pm_resume,
|
||||
|
||||
@@ -10312,7 +10312,6 @@ static void pt_enum_work_function(struct work_struct *work)
|
||||
|
||||
#if defined(CONFIG_PM_RUNTIME) || defined(KERNEL_VER_GT_3_19)
|
||||
/* CONFIG_PM_RUNTIME option is removed in 3.19.0 */
|
||||
#if defined(CONFIG_PM_SLEEP)
|
||||
/*******************************************************************************
|
||||
* FUNCTION: pt_core_rt_suspend
|
||||
*
|
||||
@@ -10369,10 +10368,8 @@ static int pt_core_rt_resume(struct device *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
#endif /* CONFIG_PM_RUNTIME || LINUX_VERSION_CODE */
|
||||
|
||||
#if defined(CONFIG_PM_SLEEP)
|
||||
/*******************************************************************************
|
||||
* FUNCTION: pt_core_suspend_
|
||||
*
|
||||
@@ -10544,7 +10541,6 @@ static int pt_core_ebc_resume(struct tp_device *tp_d)
|
||||
|
||||
return pt_core_resume_(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NEED_SUSPEND_NOTIFIER
|
||||
/*******************************************************************************
|
||||
@@ -10587,8 +10583,8 @@ static int pt_pm_notifier(struct notifier_block *nb,
|
||||
#endif
|
||||
|
||||
const struct dev_pm_ops pt_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pt_core_suspend, pt_core_resume)
|
||||
SET_RUNTIME_PM_OPS(pt_core_rt_suspend, pt_core_rt_resume,
|
||||
SYSTEM_SLEEP_PM_OPS(pt_core_suspend, pt_core_resume)
|
||||
RUNTIME_PM_OPS(pt_core_rt_suspend, pt_core_rt_resume,
|
||||
NULL)
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(pt_pm_ops);
|
||||
|
||||
@@ -1084,6 +1084,9 @@ disable_clk:
|
||||
clk_disable_unprepare(pltfm_host->clk);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int dwcmshc_runtime_suspend(struct device *dev)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,15 @@ config CANFD_ROCKCHIP
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called rockchip_canfd.
|
||||
|
||||
config CAN_RK3562
|
||||
tristate "RK3562 CAN controller"
|
||||
depends on ARCH_ROCKCHIP
|
||||
help
|
||||
Say Y here if you want to use CAN controller found on RK3562 SoCs.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called rk3562_can.
|
||||
|
||||
config CANFD_RK3576
|
||||
tristate "RK3576 CANFD controller"
|
||||
depends on ARCH_ROCKCHIP
|
||||
|
||||
@@ -5,4 +5,5 @@
|
||||
|
||||
obj-$(CONFIG_CAN_ROCKCHIP) += rockchip_can.o
|
||||
obj-$(CONFIG_CANFD_ROCKCHIP) += rockchip_canfd.o
|
||||
obj-$(CONFIG_CAN_RK3562) += rk3562_can.o
|
||||
obj-$(CONFIG_CANFD_RK3576) += rk3576_canfd.o
|
||||
|
||||
1069
drivers/net/can/rockchip/rk3562_can.c
Normal file
1069
drivers/net/can/rockchip/rk3562_can.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3108,8 +3108,7 @@ static time64_t rk817_get_rtc_sec(void)
|
||||
return rtc_tm_to_time64(&tm);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int rk817_bat_pm_suspend(struct device *dev)
|
||||
static int rk817_bat_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct rk817_battery_device *battery = dev_get_drvdata(&pdev->dev);
|
||||
@@ -3395,18 +3394,17 @@ static int rk817_bat_pm_resume(struct device *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(rk817_bat_pm_ops,
|
||||
rk817_bat_pm_suspend,
|
||||
rk817_bat_pm_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(rk817_bat_pm_ops,
|
||||
rk817_bat_pm_suspend,
|
||||
rk817_bat_pm_resume);
|
||||
|
||||
static struct platform_driver rk817_battery_driver = {
|
||||
.probe = rk817_battery_probe,
|
||||
.shutdown = rk817_battery_shutdown,
|
||||
.driver = {
|
||||
.name = "rk817-battery",
|
||||
.pm = &rk817_bat_pm_ops,
|
||||
.pm = pm_sleep_ptr(&rk817_bat_pm_ops),
|
||||
.of_match_table = of_match_ptr(rk817_bat_of_match),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -186,6 +186,7 @@ config ROCKCHIP_LITE_ULTRA_SUSPEND
|
||||
|
||||
config ROCKCHIP_SUSPEND_MODE
|
||||
tristate "Rockchip suspend mode config"
|
||||
depends on SUSPEND
|
||||
help
|
||||
Say Y here if you want to set the suspend mode to the ATF.
|
||||
|
||||
|
||||
@@ -376,9 +376,7 @@ static int rk_flexbus_spi_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops rk_flexbus_spi_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(NULL, rk_flexbus_spi_resume)
|
||||
};
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(rk_flexbus_spi_pm_ops, NULL, rk_flexbus_spi_resume);
|
||||
|
||||
static const struct of_device_id rk_flexbus_spi_dt_ids[] = {
|
||||
{ .compatible = "rockchip,flexbus-spi"},
|
||||
@@ -390,7 +388,7 @@ static struct platform_driver rk_flexbus_spi_driver = {
|
||||
.driver = {
|
||||
.name = "rockchip-flexbus-spi",
|
||||
.of_match_table = rk_flexbus_spi_dt_ids,
|
||||
.pm = &rk_flexbus_spi_pm_ops,
|
||||
.pm = pm_sleep_ptr(&rk_flexbus_spi_pm_ops),
|
||||
},
|
||||
.probe = rk_flexbus_spi_probe,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user