* [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The cpu clock on sunxi machines is just a mux clock, which is normally
fed by the main PLL, but can be muxed to the main or low power oscillator.
Make the mux clock propagate rate changes to its parent, so we can
change the clock rate of the PLL, and thus actually implement rate
changing on the cpu clock.
This patch also removes the no reparenting limit.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/clk/sunxi/clk-sunxi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index d8f17bbcb8e3..df18a2af33ad 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -778,7 +778,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
of_property_read_string(node, "clock-output-names", &clk_name);
clk = clk_register_mux(NULL, clk_name, parents, i,
- CLK_SET_RATE_NO_REPARENT, reg,
+ CLK_SET_RATE_PARENT, reg,
data->shift, SUNXI_MUX_GATE_WIDTH,
0, &clk_lock);
--
2.1.4
^ permalink raw reply related
* [PATCH 03/17] Input: sun4i-ts: Add thermal zone sensor support
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The touchscreen controller has a temperature sensor embedded in the SoC,
which already has hwmon support in the driver.
Add DT thermal zone support so we can use it with cpufreq for thermal
throttling.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
.../bindings/input/touchscreen/sun4i.txt | 1 +
drivers/input/touchscreen/sun4i-ts.c | 27 ++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
index aef57791f40b..7f1110adbd24 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
@@ -5,6 +5,7 @@ Required properties:
- compatible: "allwinner,sun4i-a10-ts"
- reg: mmio address range of the chip
- interrupts: interrupt to which the chip is connected
+ - #thermal-sensor-cells: shall be 0
Optional properties:
- allwinner,ts-attached: boolean indicating that an actual touchscreen is
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 28a06749ae42..b6e9043446d6 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -34,6 +34,7 @@
#include <linux/err.h>
#include <linux/hwmon.h>
+#include <linux/thermal.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
@@ -107,6 +108,7 @@
struct sun4i_ts_data {
struct device *dev;
struct input_dev *input;
+ struct thermal_zone_device *tz;
void __iomem *base;
unsigned int irq;
bool ignore_fifo_data;
@@ -180,6 +182,23 @@ static void sun4i_ts_close(struct input_dev *dev)
writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
}
+static int get_temp(void *data, long *temp)
+{
+ struct sun4i_ts_data *ts = data;
+
+ /* No temp_data until the first irq */
+ if (ts->temp_data == -1)
+ return -EAGAIN;
+
+ *temp = (ts->temp_data - 1447) * 100;
+
+ return 0;
+}
+
+static struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+ .get_temp = get_temp,
+};
+
static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
char *buf)
{
@@ -288,6 +307,11 @@ static int sun4i_ts_probe(struct platform_device *pdev)
if (IS_ERR(hwmon))
return PTR_ERR(hwmon);
+ ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts,
+ &sun4i_ts_tz_ops);
+ if (IS_ERR(ts->tz))
+ ts->tz = NULL;
+
writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
if (ts_attached) {
@@ -310,6 +334,9 @@ static int sun4i_ts_remove(struct platform_device *pdev)
if (ts->input)
input_unregister_device(ts->input);
+ if (ts->tz)
+ thermal_zone_of_sensor_unregister(ts->dev, ts->tz);
+
/* Deactivate all IRQs */
writel(0, ts->base + TP_INT_FIFOC);
--
2.1.4
^ permalink raw reply related
* [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.
The operating points were taken from the A20 FEX files in the
sunxi-boards repository. Not all boards have the same settings. The
settings in this patch are the most generic ones.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun7i-a20.dtsi | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 01c7133e699c..887b0521bbfb 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -82,10 +82,26 @@
#address-cells = <1>;
#size-cells = <0>;
- cpu@0 {
+ cpu0: cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
+ clocks = <&cpu>;
+ clock-latency = <244144>; /* 8 32k periods */
+ operating-points = <
+ /* kHz uV */
+ 1008000 1450000
+ 960000 1400000
+ 912000 1400000
+ 864000 1300000
+ 720000 1200000
+ 528000 1100000
+ 312000 1000000
+ 144000 900000
+ >;
+ #cooling-cells = <2>;
+ cooling-min-level = <0>;
+ cooling-max-level = <7>;
};
cpu@1 {
--
2.1.4
^ permalink raw reply related
* [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
On sun[45678]i, we have one cluster of identical cores sharing a
clock, which is ideal for using cpufreq-dt. Register a platform
device for cpufreq-dt.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/mach-sunxi/sunxi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index d4bb2395d39c..1bc811a74a9f 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -13,9 +13,15 @@
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/init.h>
+#include <linux/platform_device.h>
#include <asm/mach/arch.h>
+static void __init sunxi_dt_cpufreq_init(void)
+{
+ platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+}
+
static const char * const sunxi_board_dt_compat[] = {
"allwinner,sun4i-a10",
"allwinner,sun5i-a10s",
@@ -25,6 +31,7 @@ static const char * const sunxi_board_dt_compat[] = {
DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
.dt_compat = sunxi_board_dt_compat,
+ .init_late = sunxi_dt_cpufreq_init,
MACHINE_END
static const char * const sun6i_board_dt_compat[] = {
@@ -45,6 +52,7 @@ static void __init sun6i_timer_init(void)
DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
.init_time = sun6i_timer_init,
.dt_compat = sun6i_board_dt_compat,
+ .init_late = sunxi_dt_cpufreq_init,
MACHINE_END
static const char * const sun7i_board_dt_compat[] = {
@@ -54,6 +62,7 @@ static const char * const sun7i_board_dt_compat[] = {
DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
.dt_compat = sun7i_board_dt_compat,
+ .init_late = sunxi_dt_cpufreq_init,
MACHINE_END
static const char * const sun8i_board_dt_compat[] = {
@@ -63,6 +72,7 @@ static const char * const sun8i_board_dt_compat[] = {
DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family")
.dt_compat = sun8i_board_dt_compat,
+ .init_late = sunxi_dt_cpufreq_init,
MACHINE_END
static const char * const sun9i_board_dt_compat[] = {
--
2.1.4
^ permalink raw reply related
* [PATCH 00/17] ARM: sunxi: Support cpufreq on sun[457]i
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
Hi everyone,
This series adds support cpufreq support for sun[457]i using cpufreq-dt.
This also supports passive cpu cooling (thermal throttling) using thermal
zones with the temperature sensor in the SoC.
The operating points for the supported platforms were taken from the
linux-sunxi FEX files repository. The majority of boards use the same
settings. Only with sun7i do we see slight variations, either disabling
some frequencies, or bumping up the voltage a bit. In either case this
can be done by limiting the constraints for the supply regulator, or
overriding the OPP table in the board dts file.
On sun7i, there is an additional operating point not found in the FEX
files, 960 MHz @ 1.4V, which is the full speed setting in both u-boot-sunxi
and mainline u-boot.
The series has been tested on the 4 boards I have. With cpufreq active,
the effects are visible as a decrease in SoC internal temperature.
Stability for the operating points has been tested using:
http://linux-sunxi.org/Hardware_Reliability_Tests#Reliability_of_cpufreq_voltage.2Ffrequency_settings
More real world usage feedback is appreciated. Thermal throttling hasn't
been tested much, due to not being able to generate enough load without
the GPU for the SoC to heat up. Also on sun4i, the temperature sensor
still hasn't been calibrated, so the readings are highly inaccurate.
Patch 1 registers the cpufreq-dt platform device for all known single
cluster (all cores sharing the same supply and clock line) sunxi
platforms with a late init call.
Patch 2 makes the sunxi mux clocks propagate clk_set_rate calls to
parents. This is needed as the cpu clocks are simple mux clocks. The
actual changing part is the parent PLL.
Patch 3 adds thermal zone sensor support to sun4i-ts, which already
has hwmon support. This is used for thermal throttling.
Patch 4 adds a dtsi file for the AXP209 PMIC, which holds a list of
regulators and some common properties.
Patch 5 adds #thermal-sensor-cells to sun[457]i dtsi files for the
thermal framework.
Patch 6 adds the cpu clock and OPP to sun7i dtsi. At this point cpufreq
is usable. However the OPP does have points with over-voltage (> 1.4V).
Without the regulator reference, bumping the frequency up may be
unstable.
Patch 7 adds thermal zones for passive cooling to sun7i dtsi. This
includes a constant which should be a macro. Maxime is working on
cleaning up the sunxi dts files, so I'll leave this bit for later
to avoid repeated work and conflicts.
Patch 8 and 9 adds the axp209 regulator constraints and references
for cubieboard2 and cubietruck.
Patches 10~15 do the same as 7~9, except for sun4i and sun5i.
Patch 16 enables support for cpufreq and thermal throttling in
sunxi_defconfig.
Patch 17 does the same for multi_v7_defconfig.
The thermal sensor bits are pretty standard. Nevertheless I've included
the thermal subsystem supporters.
Dmitry, could you pick up patch 3?
Maxime, could you take a look at the rest?
Thanks
ChenYu
Chen-Yu Tsai (17):
ARM: sunxi: Register cpufreq-dt for sun[45678]i
clk: sunxi: Propagate rate changes to parent for mux clocks
Input: sun4i-ts: Add thermal zone sensor support
ARM: dts: sunxi: Add dtsi for AXP209 PMIC
ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
ARM: dts: sun7i: Add cpu thermal zones to dtsi
ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi
ARM: dts: sun5i: Add cpu thermal zones to dtsi
ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi
ARM: dts: sun4i: Add cpu thermal zones to dtsi
ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT,
CPU_THERMAL
ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
.../bindings/input/touchscreen/sun4i.txt | 1 +
arch/arm/boot/dts/axp209.dtsi | 91 ++++++++++++++++++++++
arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 35 ++++++++-
arch/arm/boot/dts/sun4i-a10.dtsi | 48 +++++++++++-
arch/arm/boot/dts/sun5i-a10s.dtsi | 1 +
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 46 +++++++++--
arch/arm/boot/dts/sun5i-a13.dtsi | 51 +++++++++++-
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 ++++++++-
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 35 ++++++++-
arch/arm/boot/dts/sun7i-a20.dtsi | 51 +++++++++++-
arch/arm/configs/multi_v7_defconfig | 2 +
arch/arm/configs/sunxi_defconfig | 7 +-
arch/arm/mach-sunxi/sunxi.c | 10 +++
drivers/clk/sunxi/clk-sunxi.c | 2 +-
drivers/input/touchscreen/sun4i-ts.c | 27 +++++++
15 files changed, 417 insertions(+), 25 deletions(-)
create mode 100644 arch/arm/boot/dts/axp209.dtsi
--
2.1.4
^ permalink raw reply
* [PATCH 07/17] ARM: dts: sun7i: Add cpu thermal zones to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun7i-a20.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 887b0521bbfb..951e99ed3aa9 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -111,6 +111,38 @@
};
};
+ thermal-zones {
+ cpu_thermal {
+ /* milliseconds */
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&rtp>;
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device = <&cpu0 (-1) (-1)>;
+ };
+ };
+
+ trips {
+ cpu_alert0: cpu_alert0 {
+ /* milliCelsius */
+ temperature = <75000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit: cpu_crit {
+ /* milliCelsius */
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
memory {
reg = <0x40000000 0x80000000>;
};
--
2.1.4
^ permalink raw reply related
* [PATCH 05/17] ARM: dts: sunxi: Enable thermal sensor support for RTP on sun[457]i
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
Now that the resistive touchpanel driver supports thermal sensors,
add the "#thermal-sensor-cells" property as required by the thermal
framework.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 1 +
arch/arm/boot/dts/sun5i-a10s.dtsi | 1 +
arch/arm/boot/dts/sun5i-a13.dtsi | 1 +
arch/arm/boot/dts/sun7i-a20.dtsi | 1 +
4 files changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 847d5e09fcfb..f92635ecb937 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -712,6 +712,7 @@
compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
+ #thermal-sensor-cells = <0>;
};
uart0: serial@01c28000 {
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 3c3c1920788a..8d324ef7e46e 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -535,6 +535,7 @@
compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
+ #thermal-sensor-cells = <0>;
};
uart0: serial@01c28000 {
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 2448d7f38d6b..4fe0bd192e29 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -469,6 +469,7 @@
compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>;
interrupts = <29>;
+ #thermal-sensor-cells = <0>;
};
uart1: serial@01c28400 {
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e21ce5992d56..01c7133e699c 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -926,6 +926,7 @@
compatible = "allwinner,sun4i-a10-ts";
reg = <0x01c25000 0x100>;
interrupts = <0 29 4>;
+ #thermal-sensor-cells = <0>;
};
uart0: serial@01c28000 {
--
2.1.4
^ permalink raw reply related
* [PATCH 12/17] ARM: dts: sun5i: hsg-h702: add axp209 regulator nodes
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.
The regulator names and constraints are based on the board
schematics and the SoC datasheet.
DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.
LDO3 powers the USB WiFi module. This patch also references it
from the usb-phy node.
Also get rid of axp209 properties already set in axp209.dtsi.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 46 ++++++++++++++++++++++++++------
1 file changed, 38 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index eeed1f236ee8..ec9b2e4e25ee 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -65,11 +65,7 @@
};
usbphy: phy@01c13400 {
- /*
- * There doesn't seem to be a GPIO for controlling
- * usb1 vbus, despite the fex file saying otherwise.
- */
- usb1_vbus-supply = <®_vcc5v0>;
+ usb1_vbus-supply = <®_ldo3>;
status = "okay";
};
@@ -102,11 +98,8 @@
status = "okay";
axp209: pmic@34 {
- compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
- interrupt-controller;
- #interrupt-cells = <1>;
};
};
@@ -128,3 +121,40 @@
};
};
};
+
+/include/ "axp209.dtsi"
+
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
+
+®_ldo3 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi";
+};
--
2.1.4
^ permalink raw reply related
* [PATCH 10/17] ARM: dts: sun5i: Add cpu clock reference and operating points to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.
The operating points were taken from the A13 FEX files in the
sunxi-boards repository. All FEX files have the same settings.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun5i-a13.dtsi | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 4fe0bd192e29..dd93d227865e 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -24,10 +24,26 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
- cpu@0 {
+
+ cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a8";
reg = <0x0>;
+ clocks = <&cpu>;
+ clock-latency = <244144>; /* 8 32k periods */
+ operating-points = <
+ /* kHz uV */
+ 1104000 1500000
+ 1008000 1400000
+ 912000 1350000
+ 864000 1300000
+ 624000 1200000
+ 576000 1200000
+ 432000 1200000
+ >;
+ #cooling-cells = <2>;
+ cooling-min-level = <0>;
+ cooling-max-level = <6>;
};
};
--
2.1.4
^ permalink raw reply related
* [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The AXP209 PMIC is used with some Allwinner SoCs. This patch adds
a dtsi file listing all the regulator nodes. The regulators are
initialized based on their device node names.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/axp209.dtsi | 87 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
create mode 100644 arch/arm/boot/dts/axp209.dtsi
diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
new file mode 100644
index 000000000000..3c38cbafe285
--- /dev/null
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this file; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * AXP202/209 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP20X.php
+ * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
+ */
+
+&axp209 {
+ regulators {
+ /* Default work frequency for buck regulators */
+ x-powers,dcdc-freq = <1500>;
+
+ /* This section lists all the regulators */
+ reg_dcdc2: dcdc2 {
+ };
+
+ reg_dcdc3: dcdc3 {
+ };
+
+ reg_ldo1: ldo1 {
+ /* LDO1 is a fixed output regulator */
+ regulator-always-on;
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ reg_ldo2: ldo2 {
+ };
+
+ reg_ldo3: ldo3 {
+ };
+
+ reg_ldo4: ldo4 {
+ };
+
+ reg_ldo5: ldo5 {
+ };
+ };
+};
--
2.1.4
^ permalink raw reply related
* [PATCH 11/17] ARM: dts: sun5i: Add cpu thermal zones to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun5i-a13.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index dd93d227865e..9140cc7c8944 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -47,6 +47,38 @@
};
};
+ thermal-zones {
+ cpu_thermal {
+ /* milliseconds */
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&rtp>;
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device = <&cpu0 (-1) (-1)>;
+ };
+ };
+
+ trips {
+ cpu_alert0: cpu_alert0 {
+ /* milliCelsius */
+ temperature = <850000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit: cpu_crit {
+ /* milliCelsius */
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
memory {
reg = <0x40000000 0x20000000>;
};
--
2.1.4
^ permalink raw reply related
* [PATCH 13/17] ARM: dts: sun4i: Add cpu clock reference and operating points to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The cpu core is clocked from the "cpu" clock. Add a reference to it
in the first cpu node. Also add "cpu0" label to the node.
The operating points were taken from the A10 FEX files in the
sunxi-boards repository. All FEX files have the same settings.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index f92635ecb937..ce3af83dd80b 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -44,10 +44,23 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
- cpu@0 {
+ cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a8";
reg = <0x0>;
+ clocks = <&cpu>;
+ clock-latency = <244144>; /* 8 32k periods */
+ operating-points = <
+ /* kHz uV */
+ 1056000 1500000
+ 1008000 1400000
+ 912000 1350000
+ 864000 1300000
+ 624000 1250000
+ >;
+ #cooling-cells = <2>;
+ cooling-min-level = <0>;
+ cooling-max-level = <4>;
};
};
--
2.1.4
^ permalink raw reply related
* [PATCH 09/17] ARM: dts: sun7i: cubietruck: add axp209 regulator nodes
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.
The regulator names and constraints are based on the board
schematics and the SoC datasheet.
DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.
Also get rid of axp209 properties already set in axp209.dtsi.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 35 ++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index a281d259b9b8..48ceb4130b3b 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -126,13 +126,9 @@
status = "okay";
axp209: pmic@34 {
- compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 8>;
-
- interrupt-controller;
- #interrupt-cells = <1>;
};
};
@@ -218,3 +214,34 @@
gpio = <&pio 7 9 0>;
};
};
+
+/include/ "axp209.dtsi"
+
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1450000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
--
2.1.4
^ permalink raw reply related
* [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.
The regulator names and constraints are based on the board
schematics and the SoC datasheet.
DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.
Also get rid of axp209 properties already set in axp209.dtsi.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/axp209.dtsi | 4 ++++
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
index 3c38cbafe285..fec3364b2110 100644
--- a/arch/arm/boot/dts/axp209.dtsi
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -54,6 +54,10 @@
*/
&axp209 {
+ compatible = "x-powers,axp209";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
regulators {
/* Default work frequency for buck regulators */
x-powers,dcdc-freq = <1500>;
diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 53680983461a..61e61c0eb829 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -84,13 +84,9 @@
status = "okay";
axp209: pmic@34 {
- compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 8>;
-
- interrupt-controller;
- #interrupt-cells = <1>;
};
};
@@ -141,3 +137,34 @@
status = "okay";
};
};
+
+/include/ "axp209.dtsi"
+
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1450000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
--
2.1.4
^ permalink raw reply related
* [PATCH 14/17] ARM: dts: sun4i: Add cpu thermal zones to dtsi
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
The core temperature sensor now supports thermal zones. Add a thermal
zone mapping for the cpus with passive cooling (cpufreq throttling).
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index ce3af83dd80b..eb626833ac86 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -64,6 +64,38 @@
};
};
+ thermal-zones {
+ cpu_thermal {
+ /* milliseconds */
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&rtp>;
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device = <&cpu0 (-1) (-1)>;
+ };
+ };
+
+ trips {
+ cpu_alert0: cpu_alert0 {
+ /* milliCelsius */
+ temperature = <850000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit: cpu_crit {
+ /* milliCelsius */
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
memory {
reg = <0x40000000 0x80000000>;
};
--
2.1.4
^ permalink raw reply related
* [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch enables TOUCHSCREEN_SUN4I, CPUFREQ_DT, and CPU_THERMAL to
enable cpufreq support with passive cpu cooling (thermal throttling)
by default.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/configs/sunxi_defconfig | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 7a342d2780a8..46a8688bd49a 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -9,6 +9,8 @@ CONFIG_HIGHMEM=y
CONFIG_HIGHPTE=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPUFREQ_DT=y
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_PM=y
@@ -54,6 +56,8 @@ CONFIG_STMMAC_ETH=y
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_SUN4I=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=8
@@ -71,7 +75,8 @@ CONFIG_GPIO_SYSFS=y
CONFIG_POWER_SUPPLY=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SUN6I=y
-# CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_SUNXI_WATCHDOG=y
CONFIG_MFD_AXP20X=y
--
2.1.4
^ permalink raw reply related
* [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch enables TOUCHSCREEN_SUN4I and CPU_THERMAL to enable cpufreq
support with passive cpu cooling (thermal throttling) on sunxi by default.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/configs/multi_v7_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2328fe752e9c..0e7159ad269b 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -189,6 +189,7 @@ CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
CONFIG_TOUCHSCREEN_STMPE=y
+CONFIG_TOUCHSCREEN_SUN4I=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_MPU3050=y
CONFIG_SERIO_AMBAKMI=y
@@ -267,6 +268,7 @@ CONFIG_POWER_RESET_SUN6I=y
CONFIG_SENSORS_LM90=y
CONFIG_SENSORS_LM95245=y
CONFIG_THERMAL=y
+CONFIG_CPU_THERMAL=y
CONFIG_ARMADA_THERMAL=y
CONFIG_ST_THERMAL_SYSCFG=y
CONFIG_ST_THERMAL_MEMMAP=y
--
2.1.4
^ permalink raw reply related
* [PATCH 15/17] ARM: dts: sun4i: cubieboard: add axp209 regulator nodes
From: Chen-Yu Tsai @ 2015-01-06 2:35 UTC (permalink / raw)
To: Maxime Ripard, Dmitry Torokhov, Zhang Rui, Eduardo Valentin
Cc: Chen-Yu Tsai, Hans de Goede, linux-input, linux-arm-kernel,
linux-pm
In-Reply-To: <1420511727-8242-1-git-send-email-wens@csie.org>
This patch adds the regulator nodes for the axp209 by including
the axp209 dtsi. As the inputs of these regulators are from the
axp209's PS output, which is basically just a mux over the 2
inputs, it is considered to be unregulated. Thus we do not provide
input supply properties for them.
The regulator names and constraints are based on the board
schematics and the SoC datasheet.
DCDC2 is used as the cpu power supply. This patch also references
it from the cpu node.
Also get rid of axp209 properties already set in axp209.dtsi.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 35 ++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 140e3ee0c15f..312bb288d764 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -134,12 +134,8 @@
status = "okay";
axp209: pmic@34 {
- compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
-
- interrupt-controller;
- #interrupt-cells = <1>;
};
};
@@ -185,3 +181,34 @@
status = "okay";
};
};
+
+/include/ "axp209.dtsi"
+
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1450000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
--
2.1.4
^ permalink raw reply related
* no response when capture hid events
From: vichy @ 2015-01-06 5:48 UTC (permalink / raw)
To: linux-input
hi all:
I try to cat hid events through debugfs but in vain.
My environment is:
1. kernel 3.10.30
2. insert below kos
usbhid
hid_generic
hid
evdev
usb_storage
ehci_hcd
xhci_hcd
usbcore
usb_common
3. mount debugfs as below
#mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=533324k,used_memory=0k,nr_inodes=96679,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dtv type tmpfs (rw,relatime,size=40960k,used_memory=0k)
tmpfs on /tmp type tmpfs (rw,relatime,size=40960k,used_memory=0k)
tmpfs on /freesia type tmpfs (rw,relatime,size=4096k,used_memory=0k)
tmpfs on /core type tmpfs (rw,relatime,size=51200k,used_memory=0k)
none on /sys/fs/cgroup type cgroup (rw,relatime,cpu)
none on /sys/kernel/debug type debugfs (rw,relatime,mode=777)
#
4. then I plug in mouse and cat events but get nothing.
did I miss any steps to do so?
appreciate your kind help in advance,
[0-367.5207] usb 6-1: New USB device found, idVendor=0461, idProduct=4e2a
[0-367.5272] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[0-367.5342] usb 6-1: Product: USB Optical Mouse
[0-367.5386] usb 6-1: Manufacturer: PixArt
[1-367.5520] input: PixArt USB Optical Mouse as
/devices/fc1a0000.ehci/usb6/6-1/6-1:1.0/input/input2
[3-367.5625] hid-generic 0003:0461:4E2A.0003: input: USB HID v1.11
Mouse [PixArt USB Optical Mouse] on usb-NT72668-1/input0
#>
#>
#> cat /sys/kernel/debug/hid/0003\:0461\:4E2A.0003/events
^ permalink raw reply
* [PATCH trivial] HID: Spelling s/Keayboard/Keyboard/
From: Geert Uytterhoeven @ 2015-01-06 8:09 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: linux-input, linux-kernel, Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/hid/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 230b6f887cd86e9b..303b295a5413d39b 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -388,7 +388,7 @@ config HID_LOGITECH_HIDPP
Say Y if you want support for Logitech devices relying on the HID++
specification. Such devices are the various Logitech Touchpads (T650,
T651, TK820), some mice (Zone Touch mouse), or even keyboards (Solar
- Keayboard).
+ Keyboard).
config LOGITECH_FF
bool "Logitech force feedback support"
--
1.9.1
^ permalink raw reply related
* [PATCH] [ADD] 1.support new ic type for version 4.
From: Sam hung @ 2015-01-06 8:10 UTC (permalink / raw)
To: linux-input, dmitry.torokhov; +Cc: dusonlin, Sam hung
---
drivers/input/mouse/elantech.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index f2b9780..4891d07 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -700,14 +700,14 @@ static int elantech_packet_check_v1(struct psmouse *psmouse)
static int elantech_debounce_check_v2(struct psmouse *psmouse)
{
- /*
- * When we encounter packet that matches this exactly, it means the
- * hardware is in debounce status. Just ignore the whole packet.
- */
- const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff };
- unsigned char *packet = psmouse->packet;
-
- return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
+ /*
+ * When we encounter packet that matches this exactly, it means the
+ * hardware is in debounce status. Just ignore the whole packet.
+ */
+ const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff };
+ unsigned char *packet = psmouse->packet;
+
+ return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
}
static int elantech_packet_check_v2(struct psmouse *psmouse)
@@ -1499,7 +1499,7 @@ static const struct dmi_system_id no_hw_res_dmi_table[] = {
/*
* determine hardware version and set some properties according to it.
*/
-static int elantech_set_properties(struct elantech_data *etd)
+static int elantech_set_properties(struct psmouse *psmouse, struct elantech_data *etd)
{
/* This represents the version of IC body. */
int ver = (etd->fw_version & 0x0f0000) >> 16;
@@ -1520,9 +1520,12 @@ static int elantech_set_properties(struct elantech_data *etd)
case 7:
case 8:
case 9:
+ case 10:
+ case 13:
etd->hw_version = 4;
break;
default:
+ psmouse_err(psmouse, "failed to setting hw version.\n");
return -1;
}
}
@@ -1593,7 +1596,7 @@ int elantech_init(struct psmouse *psmouse)
}
etd->fw_version = (param[0] << 16) | (param[1] << 8) | param[2];
- if (elantech_set_properties(etd)) {
+ if (elantech_set_properties(psmouse, etd)) {
psmouse_err(psmouse, "unknown hardware version, aborting...\n");
goto init_fail;
}
--
1.8.3.2
^ permalink raw reply related
* Re: [PATCH 2/2] HID: wacom: add support of the Pen of the Bamboo Pad
From: Jiri Kosina @ 2015-01-06 9:12 UTC (permalink / raw)
To: Jason Gerecke
Cc: Benjamin Tissoires, josep.sanchez.ferreres, Ping Cheng,
Linux Input, linux-kernel
In-Reply-To: <CANRwn3QkYkcZdugx+7AybX=f-QucU0ezp_SFftL0Pc8RPkjn9A@mail.gmail.com>
I've applied both patches, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* RE: [PATCH] Add VID/PID for HID-type Multi-Touch Module of AFO CO., LTD.
From: kyhw @ 2015-01-06 9:21 UTC (permalink / raw)
To: 'Jiri Kosina'; +Cc: rydberg, linux-input, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1405201643120.1615@pobox.suse.cz>
Thanks.
you are right. That's not necessary.
We already processed.
The final purpose of my approach is that the correct working of the AFO
multi-Touch module in All distribution of Linux.
Therefore, the inclusion of the VID,PID(AFO Touch Module) to the
hid-multitouch module is basically needed also for old version of the Linux
distribution.
Ki.
-----Original Message-----
From: Jiri Kosina [mailto:jkosina@suse.cz]
Sent: Tuesday, May 20, 2014 11:44 PM
To: YongHwan Ki
Cc: rydberg@euromail.se; linux-input@vger.kernel.org;
linux-kernel@vger.kernel.org
Subject: RE: [PATCH] Add VID/PID for HID-type Multi-Touch Module of AFO CO.,
LTD.
On Wed, 26 Mar 2014, YongHwan Ki wrote:
> Sorry, I woud like to add the AFO defines in the Linux Kernel.
> No afo defines exists in the current kernel tree.
> I correctly changed the log for adding the afo defines.
>
> Kernel Version : linux-3.14.rc7
> Signed-off-by: Yonghwan Ki <kyhw@afoi.co.kr>
>
> diff -uprN -X Documentation/dontdiff ./drivers/hid/hid-core.c
../linux-3.14-rc7m/drivers/hid/hid-core.c
> --- ./drivers/hid/hid-core.c 2014-03-17 10:51:24.000000000 +0900
> +++ ../linux-3.14-rc7m/drivers/hid/hid-core.c 2014-03-21
17:41:51.846939444 +0900
> @@ -1881,6 +1881,8 @@ static const struct hid_device_id hid_ha
> { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
> { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
> { HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON,
> USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_AFO, USB_DEVICE_ID_AFO_TCM) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_AFO, USB_DEVICE_ID_AFO_THM) },
Is this really necessary? Why doesn't HID_DG_CONTACTID matching work for the
to automatically trigger HID_GROUP_MULTITOUCH-based binding?
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* [PATCH] driver: input :touchscreen : add Raydium I2C touch driver
From: jeffrey.lin @ 2015-01-06 9:25 UTC (permalink / raw)
To: dmitry.torokhov, rydberg, shc_work, charliemooney, bleung,
lee.jones
Cc: jeffrey.lin, roger.yang, KP.li, linux-kernel, linux-input
From: "jeffrey.lin" <jeffrey.lin@rad-ic.com>
This patch is porting Raydium I2C touch driver. Developer can enable
raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
Signed-off-by: jeffrey.lin@rad-ic.com
---
drivers/input/touchscreen/Kconfig | 12 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/rm31100_ts.c | 846 +++++++++++++++++++++++++++++++++
3 files changed, 859 insertions(+)
create mode 100644 drivers/input/touchscreen/rm31100_ts.c
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 3ce9181..d0324d2 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -955,4 +955,16 @@ config TOUCHSCREEN_ZFORCE
To compile this driver as a module, choose M here: the
module will be called zforce_ts.
+config TOUCHSCREEN_RM_TS
+ tristate "Raydium I2C Touchscreen"
+ depends on I2C
+ help
+ Say Y here if you have Raydium series I2C touchscreen,
+ such as RM31100 , connected to your system.
+
+ If unsure, say N.
+
+ To compile this driver as a module, choose M here: the
+ module will be called rm31100_ts.
+
endif
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 687d5a7..3220f66 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -78,3 +78,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE) += zylonite-wm97xx.o
obj-$(CONFIG_TOUCHSCREEN_W90X900) += w90p910_ts.o
obj-$(CONFIG_TOUCHSCREEN_TPS6507X) += tps6507x-ts.o
obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o
+obj-$(CONFIG_TOUCHSCREEN_RM_TS) += rm31100_ts.o
diff --git a/drivers/input/touchscreen/rm31100_ts.c b/drivers/input/touchscreen/rm31100_ts.c
new file mode 100644
index 0000000..997dc0c
--- /dev/null
+++ b/drivers/input/touchscreen/rm31100_ts.c
@@ -0,0 +1,846 @@
+/*
+ * Raydium RM31100_ts touchscreen driver.
+ *
+ * Copyright (C) 2012-2014, Raydium Semiconductor Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2, and only version 2, as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Raydium reserves the right to make changes without further notice
+ * to the materials described herein. Raydium does not assume any
+ * liability arising out of the application described herein.
+ *
+ * Contact Raydium Semiconductor Corporation at www.rad-ic.com
+ *
+ * History:
+ * (C) 2012 Raydium - Update for GPL distribution
+ * (C) 2009 Enea - Original prototype
+ *
+ */
+#include <linux/async.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/gpio.h>
+#include <linux/mutex.h>
+#include <linux/delay.h>
+#include <linux/pm.h>
+#include <linux/pm_runtime.h>
+#ifdef CONFIG_MISC_DEV
+#include <linux/miscdevice.h>
+#endif
+#include <linux/uaccess.h>
+#include <asm/unaligned.h>
+#include <linux/input/mt.h>
+
+#define rm31100 0x0
+#define rm3110x 0x1
+
+#define INVALID_DATA 0xff
+#define MAX_REPORT_TOUCHED_POINTS 10
+
+#define I2C_CLIENT_ADDR 0x39
+#define I2C_DMA_CLIENT_ADDR 0x5A
+
+struct rm31100_ts_data {
+ u8 x_index;
+ u8 y_index;
+ u8 z_index;
+ u8 id_index;
+ u8 touch_index;
+ u8 data_reg;
+ u8 status_reg;
+ u8 data_size;
+ u8 touch_bytes;
+ u8 update_data;
+ u8 touch_meta_data;
+ u8 finger_size;
+};
+
+struct rm3110x_ts_platform_data {
+ int (*power_on)(int on);
+ int (*dev_setup)(bool on);
+ const char *ts_name;
+ u32 dis_min_x; /* display resoltion ABS min*/
+ u32 dis_max_x;/* display resoltion ABS max*/
+ u32 dis_min_y;
+ u32 dis_max_y;
+ u32 min_touch; /* no.of touches supported */
+ u32 max_touch;
+ u32 min_tid; /* track id */
+ u32 max_tid;
+ u32 min_width;/* size of the finger */
+ u32 max_width;
+ u32 res_x; /* TS resolution unit*/
+ u32 res_y;
+ u32 swap_xy;
+ u8 nfingers;
+ u32 irq_gpio;
+ int resout_gpio;
+ bool wakeup;
+ u32 irq_cfg;
+};
+
+static struct rm31100_ts_data devices[] = {
+ [0] = {
+ .x_index = 2,
+ .y_index = 4,
+ .z_index = 6,
+ .id_index = 1,
+ .data_reg = 0x1,
+ .status_reg = 0,
+ .update_data = 0x0,
+ .touch_bytes = 6,
+ .touch_meta_data = 1,
+ .finger_size = 70,
+ },
+};
+
+struct rm31100_ts {
+ struct i2c_client *client;
+ struct input_dev *input;
+ struct rm3110x_ts_platform_data *pdata;
+ struct rm31100_ts_data *dd;
+ u8 *touch_data;
+ u8 device_id;
+ u8 prev_touches;
+ bool is_suspended;
+ bool int_pending;
+ struct mutex access_lock;
+ u32 pen_irq;
+};
+
+struct rm31100_ts *pts;
+/*
+static inline u16 join_bytes(u8 a, u8 b)
+{
+ u16 ab = 0;
+ ab = ab | a;
+ ab = ab << 8 | b;
+ return ab;
+}
+*/
+static s32 rm31100_ts_write_reg_u8(struct i2c_client *client, u8 reg, u8 val)
+{
+ s32 data;
+
+ data = i2c_smbus_write_byte_data(client, reg, val);
+ if (data < 0)
+ dev_err(&client->dev, "error %d in writing reg 0x%x\n",
+ data, reg);
+
+ return data;
+}
+
+static s32 rm31100_ts_read_reg_u8(struct i2c_client *client, u8 reg)
+{
+ s32 data;
+
+ data = i2c_smbus_read_byte_data(client, reg);
+ if (data < 0)
+ dev_err(&client->dev, "error %d in reading reg 0x%x\n",
+ data, reg);
+
+ return data;
+}
+
+static int rm31100_ts_read(struct i2c_client *client, u8 reg, u8 *buf, int num)
+{
+ struct i2c_msg xfer_msg[2];
+
+ xfer_msg[0].addr = client->addr;
+ xfer_msg[0].len = 1;
+ xfer_msg[0].flags = 0;
+ xfer_msg[0].buf = ®
+
+ xfer_msg[1].addr = client->addr;
+ xfer_msg[1].len = num;
+ xfer_msg[1].flags = I2C_M_RD;
+ xfer_msg[1].buf = buf;
+
+ return i2c_transfer(client->adapter, xfer_msg, 2);
+}
+
+static int rm31100_ts_write_client_dma(struct i2c_client *client, u8 *buf, int num)
+{
+ struct i2c_msg xfer_msg[1];
+
+ xfer_msg[0].addr = I2C_DMA_CLIENT_ADDR;
+ xfer_msg[0].len = num;
+ xfer_msg[0].flags = 0;
+ xfer_msg[0].buf = buf;
+
+ return i2c_transfer(client->adapter, xfer_msg, 1);
+}
+
+static int rm31100_ts_write(struct i2c_client *client, u8 *buf, int num)
+{
+ struct i2c_msg xfer_msg[1];
+
+ xfer_msg[0].addr = client->addr;
+ xfer_msg[0].len = num;
+ xfer_msg[0].flags = 0;
+ xfer_msg[0].buf = buf;
+
+ return i2c_transfer(client->adapter, xfer_msg, 1);
+}
+#ifdef CONFIG_MISC_DEV
+static int dev_open(struct inode *inode, struct file *filp)
+{
+ mutex_lock(&pts->access_lock);
+ return 0;
+}
+
+static int dev_release(struct inode *inode, struct file *filp)
+{
+ mutex_unlock(&pts->access_lock);
+ return 0;
+}
+static ssize_t
+dev_read(struct file *filp, char __user *buf, size_t count, loff_t *pos)
+{
+ u8 *kbuf;
+ struct i2c_msg xfer_msg;
+ /*static char out[] = "1234567890";*/
+ /*static int idx;*//*= 0; remove by checkpatch*/
+ int i;
+
+ kbuf = kmalloc(count, GFP_KERNEL);
+ if (kbuf == NULL)
+ return -ENOMEM;
+
+ /*xfer_msg.addr = pts->client->addr;*/
+ xfer_msg.addr = I2C_CLIENT_ADDR;
+ xfer_msg.len = count;
+ xfer_msg.flags = I2C_M_RD;
+ xfer_msg.buf = kbuf;
+
+ i2c_transfer(pts->client->adapter, &xfer_msg, 1);
+
+ if (copy_to_user(buf, kbuf, count) == 0)
+ return count;
+ else
+ return -EFAULT;
+}
+
+static ssize_t
+dev_write(struct file *filp, const char __user *buf, size_t count, loff_t *pos)
+{
+ u8 *kbuf;
+ ssize_t status = 0;
+ int i;
+
+ kbuf = kmalloc(count, GFP_KERNEL);
+ if (kbuf == NULL) {
+ dev_err("kmalloc() fail\n");
+ return -ENOMEM;
+ }
+
+ if (copy_from_user(kbuf, buf, count) == 0) {
+ pts->client->addr = I2C_CLIENT_ADDR;
+ if (rm31100_ts_write(pts->client, kbuf, count) < 0)
+ status = -EFAULT;
+ else
+ status = count;
+ } else {
+ dev_err("copy_from_user() fail\n");
+ status = -EFAULT;
+ }
+
+ kfree(kbuf);
+ return status;
+}
+
+static struct file_operations dev_fops = {
+ .owner = THIS_MODULE,
+ .open = dev_open,
+ .release = dev_release,
+ .read = dev_read,
+ .write = dev_write,
+ /*.unlocked_ioctl = dev_ioctl,*/
+};
+
+static struct miscdevice raydium_ts_miscdev = {
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = "raydium_ts",
+ .fops = &dev_fops,
+};
+#endif
+
+
+ssize_t show(struct device_driver *drv, char *buff)
+{
+ struct i2c_msg xfer_msg;
+ int num = 10;
+ char buf[100];
+ /*int i;*/
+
+ xfer_msg.addr = pts->client->addr;
+ xfer_msg.len = num;
+ xfer_msg.flags = I2C_M_RD;
+ xfer_msg.buf = buf;
+ pts->client->addr = I2C_CLIENT_ADDR;
+ i2c_transfer(pts->client->adapter, &xfer_msg, 1);
+
+ return 0;
+}
+
+ssize_t store(struct device_driver *drv, const char *buf, size_t count)
+{
+ /*unsigned char pkt[] = { 0xF2, 5, 1, 1 };*/
+ unsigned char pkt[] = { 0xF1, 5, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+
+ pts->client->addr = I2C_CLIENT_ADDR;
+ rm31100_ts_write(pts->client, pkt, sizeof(pkt));
+
+ return sizeof(pkt);
+}
+
+DRIVER_ATTR(myAttr, 0x777, show, store);
+
+static void report_data(struct rm31100_ts *dev, u16 x, u16 y,
+ u8 pressure, u8 id)
+{
+ struct input_dev *input_dev = dev->input;
+ if (dev->pdata->swap_xy)
+ swap(x, y);
+
+ input_mt_slot(input_dev, id);
+ input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, true);
+ input_report_abs(input_dev, ABS_MT_POSITION_X, x);
+ input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
+ input_report_abs(input_dev, ABS_MT_PRESSURE, pressure);
+ input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, dev->dd->finger_size);
+/*
+ dev_dbg("%s(): id =%2hhd, x =%4hd, y =%4hd, pressure = %hhd\n",
+ __func__, id, x, y, pressure);
+*/
+}
+
+static void process_rm31100_data(struct rm31100_ts *ts)
+{
+ u8 id, pressure, touches, i;
+ u16 x, y;
+
+ touches = ts->touch_data[ts->dd->touch_index];
+
+ if (touches > 0) {
+ for (i = 0; i < touches; i++) {
+ id = ts->touch_data[i * ts->dd->touch_bytes +
+ ts->dd->id_index];
+ pressure = ts->touch_data[i * ts->dd->touch_bytes +
+ ts->dd->z_index];
+ x = get_unaligned_le16(&(ts->touch_data[i *
+ ts->dd->touch_bytes + ts->dd->x_index]));
+ y = get_unaligned_le16(&(ts->touch_data[i *
+ ts->dd->touch_bytes + ts->dd->y_index]));
+ report_data(ts, x, y, pressure, id);
+ }
+ } else
+ input_mt_sync(ts->input);
+
+ ts->prev_touches = touches;
+ /*input_report_key(ts->input, BTN_TOUCH, 1);*/
+ input_mt_report_pointer_emulation(ts->input, true);
+ input_sync(ts->input);
+}
+
+/*static void rm31100_ts_xy_worker(struct work_struct *work) JL remove*/
+static void rm31100_ts_xy_worker(struct rm31100_ts *work)
+{
+ int rc;
+ u8 client_dma_package[4] = {0x0f, 0x00, 0x20, 0x81};
+ struct rm31100_ts *ts = work;
+
+ if (ts->is_suspended == true) {
+ dev_dbg(&ts->client->dev, "TS is supended\n");
+ ts->int_pending = true;
+ return;
+ }
+
+ mutex_lock(&ts->access_lock);
+ /* read data from DATA_REG */
+ /*RM31100 DMA Mode*/
+ rc = rm31100_ts_write_client_dma(ts->client, client_dma_package, 0x04);
+ if (rc < 0) {
+ dev_err(&ts->client->dev, "write client dma failed\n");
+ goto schedule;
+ }
+ rc = rm31100_ts_read(ts->client, ts->dd->data_reg, ts->touch_data,
+ ts->dd->data_size);
+
+ if (rc < 0) {
+ dev_err(&ts->client->dev, "read failed\n");
+ goto schedule;
+ }
+
+ if (ts->touch_data[ts->dd->touch_index] == INVALID_DATA)
+ goto schedule;
+
+ /* write to STATUS_REG to release lock */
+ rc = rm31100_ts_write_reg_u8(ts->client,
+ ts->dd->status_reg, ts->dd->update_data);
+ if (rc < 0) {
+ dev_err(&ts->client->dev, "write failed, try once more\n");
+
+ rc = rm31100_ts_write_reg_u8(ts->client,
+ ts->dd->status_reg, ts->dd->update_data);
+ if (rc < 0)
+ dev_err(&ts->client->dev, "write failed, exiting\n");
+ }
+
+ process_rm31100_data(ts);
+schedule:
+ mutex_unlock(&ts->access_lock);
+}
+
+static irqreturn_t rm31100_ts_irq(int irq, void *dev_id)
+{
+ struct rm31100_ts *ts = dev_id;
+
+ rm31100_ts_xy_worker(ts);
+ return IRQ_HANDLED;
+}
+
+static int rm31100_ts_init_ts(struct i2c_client *client, struct rm31100_ts *ts)
+{
+ /*struct input_dev *input_device;*/
+ /*int rc = 0;*/
+
+ ts->dd = &devices[ts->device_id];
+
+ if (!ts->pdata->nfingers) {
+ dev_err(&client->dev, "Touches information not specified\n");
+ return -EINVAL;
+ }
+
+ if (ts->device_id == rm3110x) {
+ if (ts->pdata->nfingers > 2) {
+ dev_err(&client->dev, "Touches >=1 & <= 2\n");
+ return -EINVAL;
+ }
+ ts->dd->data_size = ts->dd->touch_bytes;
+ ts->dd->touch_index = 0x0;
+ } else if (ts->device_id == rm31100) {
+ if (ts->pdata->nfingers > 10) {
+ dev_err(&client->dev, "Touches >=1 & <= 10\n");
+ return -EINVAL;
+ }
+ ts->dd->data_size = ts->pdata->nfingers * ts->dd->touch_bytes +
+ ts->dd->touch_meta_data;
+ ts->dd->touch_index = 0x0;
+ }
+ /* w001 */
+ else {
+ ts->dd->data_size = ts->pdata->nfingers * ts->dd->touch_bytes +
+ ts->dd->touch_meta_data;
+ ts->dd->touch_index = 0x0;
+ }
+
+ ts->touch_data = kzalloc(ts->dd->data_size, GFP_KERNEL);
+ if (!ts->touch_data) {
+ pr_err("%s: Unable to allocate memory\n", __func__);
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int rm31100_ts_suspend(struct device *dev)
+{
+ struct rm31100_ts *ts = dev_get_drvdata(dev);
+ int rc = 0;
+
+ if (device_may_wakeup(dev)) {
+ /* mark suspend flag */
+ ts->is_suspended = true;
+ enable_irq_wake(ts->pen_irq);
+ }
+
+ disable_irq(ts->pen_irq);
+
+ gpio_free(ts->pdata->irq_gpio);
+
+ if (ts->pdata->power_on) {
+ rc = ts->pdata->power_on(0);
+ if (rc) {
+ dev_err(dev, "unable to goto suspend\n");
+ return rc;
+ }
+ }
+ return 0;
+}
+
+static int rm31100_ts_resume(struct device *dev)
+{
+ struct rm31100_ts *ts = dev_get_drvdata(dev);
+
+ int rc = 0;
+
+ if (device_may_wakeup(dev)) {
+ disable_irq_wake(ts->pen_irq);
+
+ ts->is_suspended = false;
+
+ if (ts->int_pending == true)
+ ts->int_pending = false;
+ } else {
+ if (ts->pdata->power_on) {
+ rc = ts->pdata->power_on(1);
+ if (rc) {
+ dev_err(dev, "unable to resume\n");
+ return rc;
+ }
+ }
+
+ enable_irq(ts->pen_irq);
+
+ /* Clear the status register of the TS controller */
+ rc = rm31100_ts_write_reg_u8(ts->client,
+ ts->dd->status_reg, ts->dd->update_data);
+ if (rc < 0) {
+ dev_err(&ts->client->dev,
+ "write failed, try once more\n");
+
+ rc = rm31100_ts_write_reg_u8(ts->client,
+ ts->dd->status_reg,
+ ts->dd->update_data);
+ if (rc < 0)
+ dev_err(&ts->client->dev,
+ "write failed, exiting\n");
+ }
+ }
+
+ return 0;
+}
+
+static struct dev_pm_ops rm31100_ts_pm_ops = {
+ .suspend = rm31100_ts_suspend,
+ .resume = rm31100_ts_resume,
+};
+#endif
+
+static int rm_input_dev_create(struct rm31100_ts *ts)
+{
+ struct input_dev *input_device;
+ int rc = 0;
+ ts->prev_touches = 0;
+
+ input_device = input_allocate_device();
+ if (!input_device) {
+ rc = -ENOMEM;
+ goto error_alloc_dev;
+ }
+ ts->input = input_device;
+
+ input_device->name = "raydium_ts";
+ input_device->id.bustype = BUS_I2C;
+ input_device->dev.parent = &ts->client->dev;
+ input_set_drvdata(input_device, ts);
+
+ __set_bit(EV_ABS, input_device->evbit);
+ __set_bit(INPUT_PROP_DIRECT, input_device->propbit);
+ __set_bit(BTN_TOUCH, input_device->keybit);
+
+
+ if (ts->device_id == rm31100) {
+ /* set up virtual key */
+ __set_bit(EV_KEY, input_device->evbit);
+ }
+ input_mt_init_slots(input_device,
+ MAX_REPORT_TOUCHED_POINTS, 0);
+ input_set_abs_params(input_device, ABS_MT_POSITION_X,
+ ts->pdata->dis_min_x, ts->pdata->dis_max_x, 0, 0);
+ input_set_abs_params(input_device, ABS_MT_POSITION_Y,
+ ts->pdata->dis_min_y, ts->pdata->dis_max_y, 0, 0);
+ input_set_abs_params(input_device, ABS_MT_PRESSURE,
+ 0, 0xFF, 0, 0);
+ input_set_abs_params(input_device, ABS_MT_TOUCH_MAJOR,
+ 0, 0xFF, 0, 0);
+ rc = input_register_device(input_device);
+ if (rc)
+ goto error_unreg_device;
+
+ return 0;
+
+error_unreg_device:
+ input_free_device(input_device);
+error_alloc_dev:
+ ts->input = NULL;
+ return rc;
+}
+
+static int rm31100_initialize(struct i2c_client *client)
+{
+ struct rm31100_ts *ts = i2c_get_clientdata(client);
+ int rc = 0, /*retry_cnt = 0,*/ temp_reg;
+ /* power on the device */
+ if (ts->pdata->power_on) {
+ rc = ts->pdata->power_on(1);
+ if (rc) {
+ pr_err("%s: Unable to power on the device\n", __func__);
+ goto error_dev_setup;
+ }
+ }
+
+ /* read one byte to make sure i2c device exists */
+ if (ts->device_id == rm3110x)
+ temp_reg = 0x01;
+ else if (ts->device_id == rm31100)
+ temp_reg = 0x00;
+ else
+ temp_reg = 0x05;
+
+ rc = rm31100_ts_read_reg_u8(client, temp_reg);
+ if (rc < 0) {
+ dev_err(&client->dev, "i2c sanity check failed\n");
+ goto error_power_on;
+ }
+
+ rc = rm31100_ts_init_ts(client, ts);
+ if (rc < 0) {
+ dev_err(&client->dev, "rm31100_ts init failed\n");
+ goto error_mutex_destroy;
+ }
+
+ /* configure touchscreen reset out gpio */
+ rc = gpio_request(ts->pdata->resout_gpio, "rm31100_resout_gpio");
+ if (rc) {
+ pr_err("%s: unable to request gpio %d\n",
+ __func__, ts->pdata->resout_gpio);
+ goto error_uninit_ts;
+ }
+
+ rc = gpio_direction_output(ts->pdata->resout_gpio, 0);
+ if (rc) {
+ pr_err("%s: unable to set direction for gpio %d\n",
+ __func__, ts->pdata->resout_gpio);
+ goto error_resout_gpio_dir;
+ }
+ /* reset gpio stabilization time */
+ msleep(20);
+
+ return 0;
+error_resout_gpio_dir:
+ if (ts->pdata->resout_gpio >= 0)
+ gpio_free(ts->pdata->resout_gpio);
+error_uninit_ts:
+ input_unregister_device(ts->input);
+ kfree(ts->touch_data);
+error_mutex_destroy:
+ mutex_destroy(&ts->access_lock);
+error_power_on:
+ if (ts->pdata->power_on)
+ ts->pdata->power_on(0);
+error_dev_setup:
+ if (ts->pdata->dev_setup)
+ ts->pdata->dev_setup(0);
+ return rc;
+}
+
+static void rm_initialize_async(void *data, async_cookie_t cookie)
+{
+ struct rm31100_ts *ts = data;
+ struct i2c_client *client = ts->client;
+ unsigned long irqflags;
+ int err = 0;
+
+ mutex_lock(&ts->access_lock);
+
+ err = rm31100_initialize(client);
+ if (err < 0) {
+ dev_err(&client->dev, "probe failed! unbind device.\n");
+ goto error_free_mem;
+ }
+
+ err = rm_input_dev_create(ts);
+ if (err) {
+ dev_err(&client->dev, "%s crated failed, %d\n", __func__, err);
+ goto error_goio_release;
+ }
+
+ irqflags = client->dev.of_node ? 0 : IRQF_TRIGGER_FALLING;
+
+ err = request_threaded_irq(ts->pen_irq, NULL,
+ rm31100_ts_irq,
+ irqflags | IRQF_ONESHOT,
+ ts->client->dev.driver->name, ts);
+ if (err) {
+ dev_err(&client->dev, "Failed to register interrupt\n");
+ goto error_dev_release;
+ }
+
+ mutex_unlock(&ts->access_lock);
+
+ return;
+
+error_dev_release:
+ input_free_device(ts->input);
+error_goio_release:
+ if (ts->pdata->resout_gpio >= 0)
+ gpio_free(ts->pdata->resout_gpio);
+error_free_mem:
+ mutex_unlock(&ts->access_lock);
+ kfree(ts);
+ return;
+}
+
+
+/*static int __devinit rm31100_ts_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)*/
+static int rm31100_ts_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
+ struct rm31100_ts *ts;
+ struct rm3110x_ts_platform_data *pdata = client->dev.platform_data;
+ int rc/*, temp_reg*/;
+ union i2c_smbus_data dummy;
+
+ if (!pdata) {
+ dev_err(&client->dev, "platform data is required!\n");
+ return -EINVAL;
+ }
+
+ if (!i2c_check_functionality(client->adapter,
+ I2C_FUNC_SMBUS_READ_WORD_DATA)) {
+ dev_err(&client->dev, "I2C functionality not supported\n");
+ return -EIO;
+ }
+ /* Make sure there is something at this address */
+ if (i2c_smbus_xfer(client->adapter, client->addr, 0,
+ I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE, &dummy) < 0)
+ return -ENODEV;
+
+ ts = kzalloc(sizeof(*ts), GFP_KERNEL);
+ if (!ts)
+ return -ENOMEM;
+ pts = ts;
+
+ /* Enable runtime PM ops, start in ACTIVE mode */
+ rc = pm_runtime_set_active(&client->dev);
+ if (rc < 0)
+ dev_warn(&client->dev, "unable to set runtime pm state\n");
+ pm_runtime_enable(&client->dev);
+
+ ts->client = client;
+ ts->pdata = pdata;
+ i2c_set_clientdata(client, ts);
+ ts->device_id = id->driver_data;
+
+ if (ts->pdata->dev_setup) {
+ rc = ts->pdata->dev_setup(1);
+ if (rc < 0) {
+ dev_err(&client->dev, "dev setup failed\n");
+ goto error_touch_data_alloc;
+ }
+ }
+
+
+ ts->is_suspended = false;
+ ts->int_pending = false;
+ /*mutex_init(&ts->sus_lock); JL remove*/
+ mutex_init(&ts->access_lock);
+
+ async_schedule(rm_initialize_async, ts);
+
+ device_init_wakeup(&client->dev, ts->pdata->wakeup);
+ return 0;
+
+error_touch_data_alloc:
+ pm_runtime_set_suspended(&client->dev);
+ pm_runtime_disable(&client->dev);
+ kfree(ts);
+ return rc;
+}
+
+/*static int __devexit RM31100_ts_remove(struct i2c_client *client)*/
+static int rm31100_ts_remove(struct i2c_client *client)
+{
+ struct rm31100_ts *ts = i2c_get_clientdata(client);
+
+ pm_runtime_set_suspended(&client->dev);
+ pm_runtime_disable(&client->dev);
+
+ device_init_wakeup(&client->dev, 0);
+ free_irq(ts->pen_irq, ts);
+
+ gpio_free(ts->pdata->irq_gpio);
+
+ if (ts->pdata->resout_gpio >= 0)
+ gpio_free(ts->pdata->resout_gpio);
+ input_unregister_device(ts->input);
+
+ /*mutex_destroy(&ts->sus_lock); JL remove*/
+ mutex_destroy(&ts->access_lock);
+
+ if (ts->pdata->power_on)
+ ts->pdata->power_on(0);
+
+ if (ts->pdata->dev_setup)
+ ts->pdata->dev_setup(0);
+
+ kfree(ts->touch_data);
+ kfree(ts);
+
+ return 0;
+}
+
+static const struct i2c_device_id rm31100_ts_id[] = {
+ {"RM31100", rm31100},
+ {"RM3110x", rm3110x},
+ {}
+};
+MODULE_DEVICE_TABLE(i2c, rm31100_ts_id);
+
+
+static struct i2c_driver rm31100_ts_driver = {
+ .driver = {
+ .name = "raydium_ts",
+ .owner = THIS_MODULE,
+#ifdef CONFIG_PM
+ .pm = &rm31100_ts_pm_ops,
+#endif
+ },
+ .probe = rm31100_ts_probe,
+ .remove = rm31100_ts_remove,
+ .id_table = rm31100_ts_id,
+};
+
+static int __init rm31100_ts_init(void)
+{
+ int rc;
+ int rc2;
+
+ rc = i2c_add_driver(&rm31100_ts_driver);
+
+ rc2 = driver_create_file(&rm31100_ts_driver.driver,
+ &driver_attr_myAttr);
+
+ return rc;
+}
+/* Making this as late init to avoid power fluctuations
+ * during LCD initialization.
+ */
+module_init(rm31100_ts_init);
+
+static void __exit rm31100_ts_exit(void)
+{
+ i2c_del_driver(&rm31100_ts_driver);
+}
+module_exit(rm31100_ts_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("rm31100-rm3110x touchscreen controller driver");
+MODULE_AUTHOR("Raydium");
+MODULE_ALIAS("platform:rm31100_ts");
--
2.1.2
^ permalink raw reply related
* Re: [RFC] [Patch] implement video driver for sur40
From: Florian Echtler @ 2015-01-06 9:29 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-input, linux-media
In-Reply-To: <549443C9.6090900@xs4all.nl>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3453 bytes --]
On Fri, 19 Dec 2014, Hans Verkuil wrote:
> drivers/media remains under heavy development, so for video capture drivers
> like yours you should always patch against either the mainline linux tree
> or (preferred) the media_tree.git repo (git://linuxtv.org/media_tree.git,
> master branch).
As per your suggestion, I've switched development to 3.18, and now I'm
nearly there in terms of v4l2-compliance (also see attachment).
There's only one failing test left, which is this one:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(284): g_field() == V4L2_FIELD_ANY
fail: v4l2-test-buffers.cpp(611): buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(884): captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
test USERPTR: OK (Not Supported)
test DMABUF: Cannot test, specify --expbuf-device
Total: 45, Succeeded: 44, Failed: 1, Warnings: 0
Could you give some hints on what this means?
On a different note, I'm getting occasional warnings in syslog when I run
a regular video streaming application (e.g. cheese):
------------[ cut here ]------------
WARNING: CPU: 1 PID: 4995 at /home/apw/COD/linux/drivers/media/v4l2-core/videobuf2-core.c:2144 __vb2_queue_cancel+0x1d0/0x240 [videobuf2_core]()
Modules linked in: sur40(OE) videobuf2_dma_contig videobuf2_memops videobuf2_core v4l2_common videodev media dm_crypt wl(POE) snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel rfcomm bnep joydev input_polldev snd_hda_controller snd_hda_codec snd_hwdep kvm_amd kvm snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi edac_core snd_seq snd_seq_device serio_raw snd_timer sp5100_tco k10temp edac_mce_amd i2c_piix4 snd btusb soundcore bluetooth cfg80211 ipmi_si ppdev lp parport_pc ipmi_msghandler parport tpm_infineon mac_hid shpchp hid_apple usbhid hid uas usb_storage pata_acpi radeon i2c_algo_bit ttm psmouse drm_kms_helper pata_atiixp drm r8169 ahci mii libahci [last unloaded: sur40]
CPU: 1 PID: 4995 Comm: cheese Tainted: P OE 3.17.1-031701-generic #201410150735
Hardware name: Samsung SUR40/SDNE-R78BA2-20, BIOS SDNE-R78BA2-2000 11/04/2011
0000000000000860 ffff8800c2c1bd28 ffffffff81796c37 0000000000000007
0000000000000000 ffff8800c2c1bd68 ffffffff81074a3c ffff8800c2c1bd58
fff8800c05904f8 ffff8800c05904d0 ffff8800abd65d38 ffff8800abd65d38
Call Trace:
[<ffffffff81796c37>] dump_stack+0x46/0x58
[<ffffffff81074a3c>] warn_slowpath_common+0x8c/0xc0
[<ffffffff81074a8a>] warn_slowpath_null+0x1a/0x20
[<ffffffffc05b7a10>] __vb2_queue_cancel+0x1d0/0x240 [videobuf2_core]
[<ffffffffc05bb3ee>] vb2_queue_release+0x1e/0x40 [videobuf2_core]
[<ffffffffc05bb481>] _vb2_fop_release+0x71/0xb0 [videobuf2_core]
[<ffffffffc05bb4ee>] vb2_fop_release+0x2e/0x50 [videobuf2_core]
[<ffffffffc0c1f491>] v4l2_release+0x41/0x90 [videodev]
[<ffffffff811eb34d>] __fput+0xbd/0x250
[<ffffffff811eb52e>] ____fput+0xe/0x10
[<ffffffff81091504>] task_work_run+0xc4/0xe0
[<ffffffff810776a6>] do_exit+0x196/0x470
[<ffffffff81082822>] ? zap_other_threads+0x82/0xa0
[<ffffffff81077a14>] do_group_exit+0x44/0xa0
[<ffffffff81077a87>] SyS_exit_group+0x17/0x20
[<ffffffff817a47ad>] system_call_fastpath+0x1a/0x1f
---[ end trace 451ed974170f6e44 ]---
Does this mean the driver consumes too much CPU resources?
Thanks for your help & best regards, Florian
--
"_Nothing_ brightens up my morning. Coffee simply provides a shade of
grey just above the pitch-black of the infinite depths of the _abyss_."
[-- Attachment #2: Type: TEXT/plain, Size: 3025 bytes --]
Driver Info:
Driver name : sur40
Card type : Samsung SUR40
Bus info : usb-0000:00:13.2-1
Driver version: 3.17.1
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Compliance test for device /dev/video0 (not using libv4l2):
Required ioctls:
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Test input 0:
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(284): g_field() == V4L2_FIELD_ANY
fail: v4l2-test-buffers.cpp(611): buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(884): captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
test USERPTR: OK (Not Supported)
test DMABUF: Cannot test, specify --expbuf-device
Total: 45, Succeeded: 44, Failed: 1, Warnings: 0
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox