Merge 0a8d6c9c71 ("Merge tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight") into android-mainline
Steps on the way to 6.5-rc1 Change-Id: I8f3543827c980ba75c58d469f5365fbab18b1d3d Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -275,6 +275,10 @@ Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski@samsung.com>
|
||||
Krzysztof Kozlowski <krzk@kernel.org> <krzysztof.kozlowski@canonical.com>
|
||||
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
Kuogee Hsieh <quic_khsieh@quicinc.com> <khsieh@codeaurora.org>
|
||||
Lee Jones <lee@kernel.org> <joneslee@google.com>
|
||||
Lee Jones <lee@kernel.org> <lee.jones@canonical.com>
|
||||
Lee Jones <lee@kernel.org> <lee.jones@linaro.org>
|
||||
Lee Jones <lee@kernel.org> <lee@ubuntu.com>
|
||||
Leonard Crestez <leonard.crestez@nxp.com> Leonard Crestez <cdleonard@gmail.com>
|
||||
Leonardo Bras <leobras.c@gmail.com> <leonardo@linux.ibm.com>
|
||||
Leonard Göhrs <l.goehrs@pengutronix.de>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
What: /sys/class/leds/<led>/dim
|
||||
Date: May 2023
|
||||
Description: 64-level DIM current. If you write a negative value or
|
||||
"auto", the dim will be calculated according to the
|
||||
brightness.
|
||||
@@ -0,0 +1,126 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/leds/awinic,aw200xx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: AWINIC AW200XX LED
|
||||
|
||||
maintainers:
|
||||
- Martin Kurbanov <mmkurbanov@sberdevices.ru>
|
||||
|
||||
description: |
|
||||
This controller is present on AW20036/AW20054/AW20072.
|
||||
It is a 3x12/6x9/6x12 matrix LED programmed via
|
||||
an I2C interface, up to 36/54/72 LEDs or 12/18/24 RGBs,
|
||||
3 pattern controllers for auto breathing or group dimming control.
|
||||
|
||||
For more product information please see the link below:
|
||||
aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs
|
||||
aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs
|
||||
aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- awinic,aw20036
|
||||
- awinic,aw20054
|
||||
- awinic,aw20072
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
awinic,display-rows:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Leds matrix size
|
||||
|
||||
patternProperties:
|
||||
"^led@[0-9a-f]$":
|
||||
type: object
|
||||
$ref: common.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description:
|
||||
LED number
|
||||
maxItems: 1
|
||||
|
||||
led-max-microamp:
|
||||
default: 9780
|
||||
description: |
|
||||
Note that a driver will take the minimum of all LED limits
|
||||
since the chip has a single global setting.
|
||||
The maximum output current of each LED is calculated by the
|
||||
following formula:
|
||||
IMAXled = 160000 * (592 / 600.5) * (1 / display-rows)
|
||||
And the minimum output current formula:
|
||||
IMINled = 3300 * (592 / 600.5) * (1 / display-rows)
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- awinic,display-rows
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: awinic,aw20036
|
||||
then:
|
||||
properties:
|
||||
awinic,display-rows:
|
||||
enum: [1, 2, 3]
|
||||
else:
|
||||
properties:
|
||||
awinic,display-rows:
|
||||
enum: [1, 2, 3, 4, 5, 6, 7]
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led-controller@3a {
|
||||
compatible = "awinic,aw20036";
|
||||
reg = <0x3a>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
awinic,display-rows = <3>;
|
||||
|
||||
led@0 {
|
||||
reg = <0x0>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
led-max-microamp = <9780>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
reg = <0x1>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
led-max-microamp = <9780>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <0x2>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
led-max-microamp = <9780>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
...
|
||||
@@ -21,6 +21,9 @@ properties:
|
||||
compatible:
|
||||
const: kinetic,ktz8866
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
vddpos-supply:
|
||||
description: positive boost supply regulator.
|
||||
|
||||
@@ -33,6 +36,7 @@ properties:
|
||||
|
||||
current-num-sinks:
|
||||
description: number of the LED current sinks' channels.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [1, 2, 3, 4, 5, 6]
|
||||
|
||||
kinetic,current-ramp-delay-ms:
|
||||
@@ -53,6 +57,7 @@ properties:
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- vddpos-supply
|
||||
- vddneg-supply
|
||||
- enable-gpios
|
||||
@@ -63,14 +68,19 @@ examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
backlight {
|
||||
compatible = "kinetic,ktz8866";
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
vddpos-supply = <&bl_vddpos_5p5>;
|
||||
vddneg-supply = <&bl_vddneg_5p5>;
|
||||
enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>;
|
||||
current-num-sinks = <5>;
|
||||
kinetic,current-ramp-delay-ms = <128>;
|
||||
kinetic,led-enable-ramp-delay-ms = <1>;
|
||||
kinetic,enable-lcd-bias;
|
||||
backlight@11 {
|
||||
compatible = "kinetic,ktz8866";
|
||||
reg = <0x11>;
|
||||
vddpos-supply = <&bl_vddpos_5p5>;
|
||||
vddneg-supply = <&bl_vddneg_5p5>;
|
||||
enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>;
|
||||
current-num-sinks = <5>;
|
||||
kinetic,current-ramp-delay-ms = <128>;
|
||||
kinetic,led-enable-ramp-delay-ms = <1>;
|
||||
kinetic,enable-lcd-bias;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/leds/backlight/lp855x-backlight.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments LP855X backlight controllers
|
||||
|
||||
maintainers:
|
||||
- Artur Weber <aweber.kernel@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ti,lp8550
|
||||
- ti,lp8551
|
||||
- ti,lp8552
|
||||
- ti,lp8553
|
||||
- ti,lp8555
|
||||
- ti,lp8556
|
||||
- ti,lp8557
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
dev-ctrl:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description:
|
||||
Value of device control register. This is a device-specific value.
|
||||
|
||||
bl-name:
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
description: Backlight device name.
|
||||
|
||||
init-brt:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: Initial value of backlight brightness.
|
||||
|
||||
power-supply:
|
||||
description: Regulator which controls the 3V rail.
|
||||
|
||||
enable-supply:
|
||||
description: Regulator which controls the EN/VDDIO input.
|
||||
|
||||
pwms:
|
||||
maxItems: 1
|
||||
description: |
|
||||
PWM channel to use for controlling the backlight; setting this
|
||||
enables the PWM-based backlight control mode.
|
||||
|
||||
pwm-names: true
|
||||
|
||||
pwm-period:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
PWM period value. Deprecated; set the period value in the pwms
|
||||
property instead.
|
||||
deprecated: true
|
||||
|
||||
patternProperties:
|
||||
"^rom-[0-9a-f]{2}h$":
|
||||
type: object
|
||||
description: Nodes containing the values of configuration registers.
|
||||
additionalProperties: false
|
||||
properties:
|
||||
rom-addr:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: Register address of ROM area to be updated.
|
||||
|
||||
rom-val:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: Value to write to the ROM register.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- dev-ctrl
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8555";
|
||||
reg = <0x2c>;
|
||||
|
||||
dev-ctrl = /bits/ 8 <0x00>;
|
||||
|
||||
pwms = <&pwm 0 10000>;
|
||||
pwm-names = "lp8555";
|
||||
|
||||
/* 4V OV, 4 output LED0 string enabled */
|
||||
rom-14h {
|
||||
rom-addr = /bits/ 8 <0x14>;
|
||||
rom-val = /bits/ 8 <0xcf>;
|
||||
};
|
||||
|
||||
/* Heavy smoothing, 24ms ramp time step */
|
||||
rom-15h {
|
||||
rom-addr = /bits/ 8 <0x15>;
|
||||
rom-val = /bits/ 8 <0xc7>;
|
||||
};
|
||||
|
||||
/* 4 output LED1 string enabled */
|
||||
rom-19h {
|
||||
rom-addr = /bits/ 8 <0x19>;
|
||||
rom-val = /bits/ 8 <0x0f>;
|
||||
};
|
||||
};
|
||||
};
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8556";
|
||||
reg = <0x2c>;
|
||||
|
||||
bl-name = "lcd-bl";
|
||||
dev-ctrl = /bits/ 8 <0x85>;
|
||||
init-brt = /bits/ 8 <0x10>;
|
||||
};
|
||||
};
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8557";
|
||||
reg = <0x2c>;
|
||||
enable-supply = <&backlight_vddio>;
|
||||
power-supply = <&backlight_vdd>;
|
||||
|
||||
dev-ctrl = /bits/ 8 <0x41>;
|
||||
init-brt = /bits/ 8 <0x0a>;
|
||||
|
||||
/* 4V OV, 4 output LED string enabled */
|
||||
rom-14h {
|
||||
rom-addr = /bits/ 8 <0x14>;
|
||||
rom-val = /bits/ 8 <0xcf>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,72 +0,0 @@
|
||||
lp855x bindings
|
||||
|
||||
Required properties:
|
||||
- compatible: "ti,lp8550", "ti,lp8551", "ti,lp8552", "ti,lp8553",
|
||||
"ti,lp8555", "ti,lp8556", "ti,lp8557"
|
||||
- reg: I2C slave address (u8)
|
||||
- dev-ctrl: Value of DEVICE CONTROL register (u8). It depends on the device.
|
||||
|
||||
Optional properties:
|
||||
- bl-name: Backlight device name (string)
|
||||
- init-brt: Initial value of backlight brightness (u8)
|
||||
- pwm-period: PWM period value. Set only PWM input mode used (u32)
|
||||
- rom-addr: Register address of ROM area to be updated (u8)
|
||||
- rom-val: Register value to be updated (u8)
|
||||
- power-supply: Regulator which controls the 3V rail
|
||||
- enable-supply: Regulator which controls the EN/VDDIO input
|
||||
|
||||
Example:
|
||||
|
||||
/* LP8555 */
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8555";
|
||||
reg = <0x2c>;
|
||||
|
||||
dev-ctrl = /bits/ 8 <0x00>;
|
||||
pwm-period = <10000>;
|
||||
|
||||
/* 4V OV, 4 output LED0 string enabled */
|
||||
rom_14h {
|
||||
rom-addr = /bits/ 8 <0x14>;
|
||||
rom-val = /bits/ 8 <0xcf>;
|
||||
};
|
||||
|
||||
/* Heavy smoothing, 24ms ramp time step */
|
||||
rom_15h {
|
||||
rom-addr = /bits/ 8 <0x15>;
|
||||
rom-val = /bits/ 8 <0xc7>;
|
||||
};
|
||||
|
||||
/* 4 output LED1 string enabled */
|
||||
rom_19h {
|
||||
rom-addr = /bits/ 8 <0x19>;
|
||||
rom-val = /bits/ 8 <0x0f>;
|
||||
};
|
||||
};
|
||||
|
||||
/* LP8556 */
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8556";
|
||||
reg = <0x2c>;
|
||||
|
||||
bl-name = "lcd-bl";
|
||||
dev-ctrl = /bits/ 8 <0x85>;
|
||||
init-brt = /bits/ 8 <0x10>;
|
||||
};
|
||||
|
||||
/* LP8557 */
|
||||
backlight@2c {
|
||||
compatible = "ti,lp8557";
|
||||
reg = <0x2c>;
|
||||
enable-supply = <&backlight_vddio>;
|
||||
power-supply = <&backlight_vdd>;
|
||||
|
||||
dev-ctrl = /bits/ 8 <0x41>;
|
||||
init-brt = /bits/ 8 <0x0a>;
|
||||
|
||||
/* 4V OV, 4 output LED string enabled */
|
||||
rom_14h {
|
||||
rom-addr = /bits/ 8 <0x14>;
|
||||
rom-val = /bits/ 8 <0xcf>;
|
||||
};
|
||||
};
|
||||
@@ -68,7 +68,6 @@ dependencies:
|
||||
required:
|
||||
- compatible
|
||||
- pwms
|
||||
- power-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
|
||||
@@ -105,8 +105,6 @@ properties:
|
||||
- audio-mute
|
||||
# LED indicates bluetooth power state
|
||||
- bluetooth-power
|
||||
# LED indicates activity of all CPUs
|
||||
- cpu
|
||||
# LED indicates camera flash state
|
||||
- flash
|
||||
# LED indicated keyboard capslock
|
||||
|
||||
@@ -34,7 +34,7 @@ required:
|
||||
- color
|
||||
|
||||
allOf:
|
||||
- $ref: "common.yaml#"
|
||||
- $ref: common.yaml#
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
|
||||
@@ -66,6 +66,14 @@ properties:
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
ti,charge-pump-mode:
|
||||
description:
|
||||
Set the operating mode of the internal charge pump as defined in
|
||||
<dt-bindings/leds/leds-lp55xx.h>.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
default: 3 # auto
|
||||
maximum: 3
|
||||
|
||||
patternProperties:
|
||||
'^multi-led@[0-8]$':
|
||||
type: object
|
||||
@@ -152,6 +160,7 @@ additionalProperties: false
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/leds/leds-lp55xx.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
@@ -164,6 +173,7 @@ examples:
|
||||
reg = <0x32>;
|
||||
clock-mode = /bits/ 8 <2>;
|
||||
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
|
||||
ti,charge-pump-mode = <LP55XX_CP_BYPASS>;
|
||||
|
||||
led@0 {
|
||||
reg = <0>;
|
||||
|
||||
@@ -12,7 +12,10 @@ For MediaTek PMIC wrapper bindings see:
|
||||
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "mediatek,mt6323-led"
|
||||
- compatible : Must be one of
|
||||
- "mediatek,mt6323-led"
|
||||
- "mediatek,mt6331-led"
|
||||
- "mediatek,mt6332-led"
|
||||
- address-cells : Must be 1
|
||||
- size-cells : Must be 0
|
||||
|
||||
|
||||
@@ -16,18 +16,24 @@ description: >
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,pm660l-lpg
|
||||
- qcom,pm8150b-lpg
|
||||
- qcom,pm8150l-lpg
|
||||
- qcom,pm8350c-pwm
|
||||
- qcom,pm8916-pwm
|
||||
- qcom,pm8941-lpg
|
||||
- qcom,pm8994-lpg
|
||||
- qcom,pmc8180c-lpg
|
||||
- qcom,pmi8994-lpg
|
||||
- qcom,pmi8998-lpg
|
||||
- qcom,pmk8550-pwm
|
||||
oneOf:
|
||||
- enum:
|
||||
- qcom,pm660l-lpg
|
||||
- qcom,pm8150b-lpg
|
||||
- qcom,pm8150l-lpg
|
||||
- qcom,pm8350c-pwm
|
||||
- qcom,pm8916-pwm
|
||||
- qcom,pm8941-lpg
|
||||
- qcom,pm8994-lpg
|
||||
- qcom,pmc8180c-lpg
|
||||
- qcom,pmi632-lpg
|
||||
- qcom,pmi8994-lpg
|
||||
- qcom,pmi8998-lpg
|
||||
- qcom,pmk8550-pwm
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,pm8550-pwm
|
||||
- const: qcom,pm8350c-pwm
|
||||
|
||||
"#pwm-cells":
|
||||
const: 2
|
||||
|
||||
@@ -20,6 +20,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ocs,ocp8110
|
||||
- richtek,rt5033-led
|
||||
- sgmicro,sgm3140
|
||||
|
||||
enable-gpios:
|
||||
|
||||
@@ -26,6 +26,8 @@ properties:
|
||||
- qcom,pm8150c-flash-led
|
||||
- qcom,pm8150l-flash-led
|
||||
- qcom,pm8350c-flash-led
|
||||
- qcom,pm8550-flash-led
|
||||
- qcom,pmi8998-flash-led
|
||||
- const: qcom,spmi-flash-led
|
||||
|
||||
reg:
|
||||
|
||||
@@ -32,7 +32,7 @@ patternProperties:
|
||||
properties:
|
||||
rohm,led-compatible:
|
||||
description: LED identification string
|
||||
$ref: "/schemas/types.yaml#/definitions/string"
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
enum:
|
||||
- bd71828-ambled
|
||||
- bd71828-grnled
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
Broadcom BCM2835 VideoCore mailbox IPC
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Should be "brcm,bcm2835-mbox"
|
||||
- reg: Specifies base physical address and size of the registers
|
||||
- interrupts: The interrupt number
|
||||
See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
|
||||
- #mbox-cells: Specifies the number of cells needed to encode a mailbox
|
||||
channel. The value shall be 0, since there is only one
|
||||
mailbox channel implemented by the device.
|
||||
|
||||
Example:
|
||||
|
||||
mailbox: mailbox@7e00b880 {
|
||||
compatible = "brcm,bcm2835-mbox";
|
||||
reg = <0x7e00b880 0x40>;
|
||||
interrupts = <0 1>;
|
||||
#mbox-cells = <0>;
|
||||
};
|
||||
|
||||
firmware: firmware {
|
||||
compatible = "raspberrypi,firmware";
|
||||
mboxes = <&mailbox>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mailbox/brcm,bcm2835-mbox.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Broadcom BCM2835 VideoCore mailbox IPC
|
||||
|
||||
maintainers:
|
||||
- Stefan Wahren <stefan.wahren@i2se.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: brcm,bcm2835-mbox
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
"#mbox-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- "#mbox-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
mailbox@7e00b880 {
|
||||
compatible = "brcm,bcm2835-mbox";
|
||||
reg = <0x7e00b880 0x40>;
|
||||
interrupts = <0 1>;
|
||||
#mbox-cells = <0>;
|
||||
};
|
||||
@@ -66,6 +66,7 @@ properties:
|
||||
oneOf:
|
||||
- const: nvidia,tegra186-hsp
|
||||
- const: nvidia,tegra194-hsp
|
||||
- const: nvidia,tegra264-hsp
|
||||
- items:
|
||||
- const: nvidia,tegra234-hsp
|
||||
- const: nvidia,tegra194-hsp
|
||||
|
||||
@@ -18,6 +18,7 @@ properties:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,ipq5018-apcs-apps-global
|
||||
- qcom,ipq5332-apcs-apps-global
|
||||
- qcom,ipq8074-apcs-apps-global
|
||||
- qcom,ipq9574-apcs-apps-global
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MAX77540/MAX77541 PMIC from ADI
|
||||
|
||||
maintainers:
|
||||
- Okan Sahin <okan.sahin@analog.com>
|
||||
|
||||
description: |
|
||||
MAX77540 is a Power Management IC with 2 buck regulators.
|
||||
|
||||
MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,max77540
|
||||
- adi,max77541
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
regulators:
|
||||
$ref: /schemas/regulator/adi,max77541-regulator.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pmic@69 {
|
||||
compatible = "adi,max77541";
|
||||
reg = <0x69>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
regulators {
|
||||
buck1 {
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <5200000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
buck2 {
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <5200000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -122,12 +122,6 @@ patternProperties:
|
||||
compatible:
|
||||
const: gw,gsc-fan
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
reg:
|
||||
description: The fan controller base address
|
||||
maxItems: 1
|
||||
@@ -135,8 +129,6 @@ patternProperties:
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@@ -194,8 +186,6 @@ examples:
|
||||
};
|
||||
|
||||
fan-controller@2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "gw,gsc-fan";
|
||||
reg = <0x2c>;
|
||||
};
|
||||
|
||||
@@ -71,6 +71,7 @@ properties:
|
||||
- qcom,pm8998
|
||||
- qcom,pma8084
|
||||
- qcom,pmd9635
|
||||
- qcom,pmi632
|
||||
- qcom,pmi8950
|
||||
- qcom,pmi8962
|
||||
- qcom,pmi8994
|
||||
@@ -146,6 +147,10 @@ patternProperties:
|
||||
type: object
|
||||
$ref: /schemas/nvmem/qcom,spmi-sdam.yaml#
|
||||
|
||||
"phy@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml#
|
||||
|
||||
"pon@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: /schemas/power/reset/qcom,pon.yaml#
|
||||
|
||||
@@ -34,6 +34,7 @@ properties:
|
||||
- qcom,tcsr-ipq5332
|
||||
- qcom,tcsr-ipq6018
|
||||
- qcom,tcsr-ipq8064
|
||||
- qcom,tcsr-ipq8074
|
||||
- qcom,tcsr-ipq9574
|
||||
- qcom,tcsr-mdm9615
|
||||
- qcom,tcsr-msm8226
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/richtek,rt5033.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Richtek RT5033 Power Management Integrated Circuit
|
||||
|
||||
maintainers:
|
||||
- Jakob Hauser <jahau@rocketmail.com>
|
||||
|
||||
description:
|
||||
RT5033 is a multifunction device which includes battery charger, fuel gauge,
|
||||
flash LED current source, LDO and synchronous Buck converter for portable
|
||||
applications. It is interfaced to host controller using I2C interface. The
|
||||
battery fuel gauge uses a separate I2C bus.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: richtek,rt5033
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
regulators:
|
||||
description:
|
||||
The regulators of RT5033 have to be instantiated under a sub-node named
|
||||
"regulators". For SAFE_LDO voltage there is only one value of 4.9 V. LDO
|
||||
voltage ranges from 1.2 V to 3.0 V in 0.1 V steps. BUCK voltage ranges
|
||||
from 1.0 V to 3.0 V in 0.1 V steps.
|
||||
type: object
|
||||
patternProperties:
|
||||
"^(SAFE_LDO|LDO|BUCK)$":
|
||||
type: object
|
||||
$ref: /schemas/regulator/regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
additionalProperties: false
|
||||
|
||||
charger:
|
||||
type: object
|
||||
$ref: /schemas/power/supply/richtek,rt5033-charger.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
battery: battery {
|
||||
compatible = "simple-battery";
|
||||
precharge-current-microamp = <450000>;
|
||||
constant-charge-current-max-microamp = <1000000>;
|
||||
charge-term-current-microamp = <150000>;
|
||||
precharge-upper-limit-microvolt = <3500000>;
|
||||
constant-charge-voltage-max-microvolt = <4350000>;
|
||||
};
|
||||
|
||||
extcon {
|
||||
usb_con: connector {
|
||||
compatible = "usb-b-connector";
|
||||
label = "micro-USB";
|
||||
type = "micro";
|
||||
};
|
||||
};
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
fuel-gauge@35 {
|
||||
compatible = "richtek,rt5033-battery";
|
||||
reg = <0x35>;
|
||||
|
||||
interrupt-parent = <&msmgpio>;
|
||||
interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&fg_alert_default>;
|
||||
|
||||
power-supplies = <&rt5033_charger>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
|
||||
pmic@34 {
|
||||
compatible = "richtek,rt5033";
|
||||
reg = <0x34>;
|
||||
|
||||
interrupt-parent = <&msmgpio>;
|
||||
interrupts = <62 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int_default>;
|
||||
|
||||
regulators {
|
||||
safe_ldo_reg: SAFE_LDO {
|
||||
regulator-name = "SAFE_LDO";
|
||||
regulator-min-microvolt = <4900000>;
|
||||
regulator-max-microvolt = <4900000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
ldo_reg: LDO {
|
||||
regulator-name = "LDO";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
};
|
||||
buck_reg: BUCK {
|
||||
regulator-name = "BUCK";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
};
|
||||
|
||||
rt5033_charger: charger {
|
||||
compatible = "richtek,rt5033-charger";
|
||||
monitored-battery = <&battery>;
|
||||
richtek,usb-connector = <&usb_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -153,29 +153,18 @@ dependencies:
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
- not:
|
||||
required:
|
||||
- s5m8767,pmic-buck2-uses-gpio-dvs
|
||||
then:
|
||||
properties:
|
||||
s5m8767,pmic-buck3-uses-gpio-dvs: false
|
||||
s5m8767,pmic-buck4-uses-gpio-dvs: false
|
||||
|
||||
- if:
|
||||
- s5m8767,pmic-buck3-uses-gpio-dvs
|
||||
- not:
|
||||
required:
|
||||
- s5m8767,pmic-buck2-uses-gpio-dvs
|
||||
- s5m8767,pmic-buck4-uses-gpio-dvs
|
||||
- not:
|
||||
required:
|
||||
- s5m8767,pmic-buck3-uses-gpio-dvs
|
||||
then:
|
||||
properties:
|
||||
s5m8767,pmic-buck2-uses-gpio-dvs: false
|
||||
s5m8767,pmic-buck4-uses-gpio-dvs: false
|
||||
|
||||
- if:
|
||||
required:
|
||||
- s5m8767,pmic-buck4-uses-gpio-dvs
|
||||
then:
|
||||
properties:
|
||||
s5m8767,pmic-buck2-uses-gpio-dvs: false
|
||||
s5m8767,pmic-buck3-uses-gpio-dvs: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -184,7 +184,7 @@ properties:
|
||||
additionalProperties: false
|
||||
|
||||
patternProperties:
|
||||
"^(buck[1-4]|ldo[1-6]|boost|pwr_sw[1-2])-supply$":
|
||||
"^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$":
|
||||
description: STPMIC1 voltage regulators supplies
|
||||
|
||||
"^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: TI TPS6594 Power Management Integrated Circuit
|
||||
|
||||
maintainers:
|
||||
- Julien Panis <jpanis@baylibre.com>
|
||||
|
||||
description:
|
||||
TPS6594 is a Power Management IC which provides regulators and others
|
||||
features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and
|
||||
PFSM (Pre-configurable Finite State Machine) managing the state of the device.
|
||||
TPS6594 is the super-set device while TPS6593 and LP8764 are derivatives.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ti,lp8764-q1
|
||||
- ti,tps6593-q1
|
||||
- ti,tps6594-q1
|
||||
|
||||
reg:
|
||||
description: I2C slave address or SPI chip select number.
|
||||
maxItems: 1
|
||||
|
||||
ti,primary-pmic:
|
||||
type: boolean
|
||||
description: |
|
||||
Identify the primary PMIC on SPMI bus.
|
||||
A multi-PMIC synchronization scheme is implemented in the PMIC device
|
||||
to synchronize the power state changes with other PMIC devices. This is
|
||||
accomplished through a SPMI bus: the primary PMIC is the controller
|
||||
device on the SPMI bus, and the secondary PMICs are the target devices
|
||||
on the SPMI bus.
|
||||
|
||||
system-power-controller: true
|
||||
|
||||
gpio-controller: true
|
||||
|
||||
'#gpio-cells':
|
||||
const: 2
|
||||
description: |
|
||||
The first cell is the pin number, the second cell is used to specify flags.
|
||||
See ../gpio/gpio.txt for more information.
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
regulators:
|
||||
type: object
|
||||
description: List of regulators provided by this controller.
|
||||
|
||||
patternProperties:
|
||||
"^buck([1-5]|12|34|123|1234)$":
|
||||
type: object
|
||||
$ref: /schemas/regulator/regulator.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo[1-4]$":
|
||||
type: object
|
||||
$ref: /schemas/regulator/regulator.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
required:
|
||||
- buck12
|
||||
then:
|
||||
properties:
|
||||
buck123: false
|
||||
buck1234: false
|
||||
- if:
|
||||
required:
|
||||
- buck123
|
||||
then:
|
||||
properties:
|
||||
buck34: false
|
||||
- if:
|
||||
required:
|
||||
- buck1234
|
||||
then:
|
||||
properties:
|
||||
buck34: false
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
patternProperties:
|
||||
"^buck([1-5]|12|34|123|1234)-supply$":
|
||||
description: Input supply phandle for each buck.
|
||||
|
||||
"^ldo[1-4]-supply$":
|
||||
description: Input supply phandle for each ldo.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
tps6593: pmic@48 {
|
||||
compatible = "ti,tps6593-q1";
|
||||
reg = <0x48>;
|
||||
ti,primary-pmic;
|
||||
system-power-controller;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_irq_pins_default>;
|
||||
interrupt-parent = <&mcu_gpio0>;
|
||||
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
buck123-supply = <&vcc_3v3_sys>;
|
||||
buck4-supply = <&vcc_3v3_sys>;
|
||||
buck5-supply = <&vcc_3v3_sys>;
|
||||
ldo1-supply = <&vcc_3v3_sys>;
|
||||
ldo2-supply = <&vcc_3v3_sys>;
|
||||
ldo3-supply = <&buck5>;
|
||||
ldo4-supply = <&vcc_3v3_sys>;
|
||||
|
||||
regulators {
|
||||
buck123: buck123 {
|
||||
regulator-name = "vcc_core";
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
buck4: buck4 {
|
||||
regulator-name = "vcc_1v1";
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
buck5: buck5 {
|
||||
regulator-name = "vcc_1v8_sys";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo1: ldo1 {
|
||||
regulator-name = "vddshv5_sdio";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2: ldo2 {
|
||||
regulator-name = "vpp_1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo3: ldo3 {
|
||||
regulator-name = "vcc_0v85";
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4: ldo4 {
|
||||
regulator-name = "vdda_1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -90,6 +90,7 @@ properties:
|
||||
oneOf:
|
||||
- enum:
|
||||
- x-powers,axp152
|
||||
- x-powers,axp192
|
||||
- x-powers,axp202
|
||||
- x-powers,axp209
|
||||
- x-powers,axp221
|
||||
|
||||
@@ -26,7 +26,7 @@ required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/power/supply/richtek,rt5033-charger.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Richtek RT5033 PMIC Battery Charger
|
||||
|
||||
maintainers:
|
||||
- Jakob Hauser <jahau@rocketmail.com>
|
||||
|
||||
description:
|
||||
The battery charger of the multifunction device RT5033 has to be instantiated
|
||||
under sub-node named "charger" using the following format.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: richtek,rt5033-charger
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: |
|
||||
Phandle to the monitored battery according to battery.yaml. The battery
|
||||
node needs to contain five parameters.
|
||||
|
||||
precharge-current-microamp:
|
||||
Current of pre-charge mode. The pre-charge current levels are 350 mA
|
||||
to 650 mA programmed by I2C per 100 mA.
|
||||
|
||||
constant-charge-current-max-microamp:
|
||||
Current of fast-charge mode. The fast-charge current levels are 700 mA
|
||||
to 2000 mA programmed by I2C per 100 mA.
|
||||
|
||||
charge-term-current-microamp:
|
||||
This property is end of charge current. Its level ranges from 150 mA
|
||||
to 600 mA. Between 150 mA and 300 mA in 50 mA steps, between 300 mA and
|
||||
600 mA in 100 mA steps.
|
||||
|
||||
precharge-upper-limit-microvolt:
|
||||
Voltage of pre-charge mode. If the battery voltage is below the pre-charge
|
||||
threshold voltage, the charger is in pre-charge mode with pre-charge
|
||||
current. Its levels are 2.3 V to 3.8 V programmed by I2C per 0.1 V.
|
||||
|
||||
constant-charge-voltage-max-microvolt:
|
||||
Battery regulation voltage of constant voltage mode. This voltage levels
|
||||
from 3.65 V to 4.4 V by I2C per 0.025 V.
|
||||
|
||||
richtek,usb-connector:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
Phandle to a USB connector according to usb-connector.yaml. The connector
|
||||
should be a child of the extcon device.
|
||||
|
||||
required:
|
||||
- monitored-battery
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
charger {
|
||||
compatible = "richtek,rt5033-charger";
|
||||
monitored-battery = <&battery>;
|
||||
richtek,usb-connector = <&usb_con>;
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/regulator/adi,max77541-regulator.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Buck Converter for MAX77540/MAX77541
|
||||
|
||||
maintainers:
|
||||
- Okan Sahin <okan.sahin@analog.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for ADI MAX77540/MAX77541
|
||||
|
||||
The buck converter is represented as a sub-node of the PMIC node on the device tree.
|
||||
|
||||
The device has two buck regulators.
|
||||
See also Documentation/devicetree/bindings/mfd/adi,max77541.yaml for
|
||||
additional information and example.
|
||||
|
||||
patternProperties:
|
||||
"^buck[12]$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
additionalProperties: false
|
||||
description: |
|
||||
Buck regulator.
|
||||
|
||||
properties:
|
||||
regulator-name: true
|
||||
regulator-always-on: true
|
||||
regulator-boot-on: true
|
||||
regulator-min-microvolt:
|
||||
minimum: 300000
|
||||
regulator-max-microvolt:
|
||||
maximum: 5200000
|
||||
|
||||
additionalProperties: false
|
||||
@@ -1,38 +0,0 @@
|
||||
Intersil ISL1209/19 I2C RTC/Alarm chip with event in
|
||||
|
||||
ISL12X9 have additional pins EVIN and #EVDET for tamper detection, while the
|
||||
ISL1208 and ISL1218 do not. They are all use the same driver with the bindings
|
||||
described here, with chip specific properties as noted.
|
||||
|
||||
Required properties supported by the device:
|
||||
- "compatible": Should be one of the following:
|
||||
- "isil,isl1208"
|
||||
- "isil,isl1209"
|
||||
- "isil,isl1218"
|
||||
- "isil,isl1219"
|
||||
- "reg": I2C bus address of the device
|
||||
|
||||
Optional properties:
|
||||
- "interrupt-names": list which may contains "irq" and "evdet"
|
||||
evdet applies to isl1209 and isl1219 only
|
||||
- "interrupts": list of interrupts for "irq" and "evdet"
|
||||
evdet applies to isl1209 and isl1219 only
|
||||
- "isil,ev-evienb": Enable or disable internal pull on EVIN pin
|
||||
Applies to isl1209 and isl1219 only
|
||||
Possible values are 0 and 1
|
||||
Value 0 enables internal pull-up on evin pin, 1 disables it.
|
||||
Default will leave the non-volatile configuration of the pullup
|
||||
as is.
|
||||
|
||||
Example isl1219 node with #IRQ pin connected to SoC gpio1 pin12 and #EVDET pin
|
||||
connected to SoC gpio2 pin 24 and internal pull-up enabled in EVIN pin.
|
||||
|
||||
isl1219: rtc@68 {
|
||||
compatible = "isil,isl1219";
|
||||
reg = <0x68>;
|
||||
interrupt-names = "irq", "evdet";
|
||||
interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
|
||||
<&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
|
||||
isil,ev-evienb = <1>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/isil,isl1208.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Intersil ISL1209/19 I2C RTC/Alarm chip with event in
|
||||
|
||||
maintainers:
|
||||
- Biju Das <biju.das.jz@bp.renesas.com>
|
||||
- Trent Piepho <tpiepho@gmail.com>
|
||||
|
||||
description:
|
||||
ISL12X9 have additional pins EVIN and EVDET for tamper detection, while the
|
||||
ISL1208 and ISL1218 do not.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- isil,isl1208
|
||||
- isil,isl1209
|
||||
- isil,isl1218
|
||||
- isil,isl1219
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
description: |
|
||||
Use xin, if connected to an external crystal.
|
||||
Use clkin, if connected to an external clock signal.
|
||||
enum:
|
||||
- xin
|
||||
- clkin
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: irq
|
||||
- const: evdet
|
||||
|
||||
isil,ev-evienb:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [ 0, 1 ]
|
||||
description: |
|
||||
Enable or disable internal pull on EVIN pin
|
||||
Default will leave the non-volatile configuration of the pullup
|
||||
as is.
|
||||
<0> : Enables internal pull-up on evin pin
|
||||
<1> : Disables internal pull-up on evin pin
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- isil,isl1209
|
||||
- isil,isl1219
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
maxItems: 2
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: irq
|
||||
- const: evdet
|
||||
else:
|
||||
properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: irq
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc_twi: rtc@6f {
|
||||
compatible = "isil,isl1208";
|
||||
reg = <0x6f>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/loongson,rtc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Loongson Real-Time Clock
|
||||
|
||||
description:
|
||||
The Loongson family chips use an on-chip counter 0 (Time Of Year
|
||||
counter) as the RTC.
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- loongson,ls1b-rtc
|
||||
- loongson,ls1c-rtc
|
||||
- loongson,ls7a-rtc
|
||||
- loongson,ls2k1000-rtc
|
||||
- items:
|
||||
- enum:
|
||||
- loongson,ls2k2000-rtc
|
||||
- loongson,ls2k0500-rtc
|
||||
- const: loongson,ls7a-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
rtc@1fe27800 {
|
||||
compatible = "loongson,ls2k1000-rtc";
|
||||
reg = <0x1fe27800 0x100>;
|
||||
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
...
|
||||
@@ -15,7 +15,7 @@ description: |
|
||||
|
||||
properties:
|
||||
$nodename:
|
||||
pattern: "^rtc(@.*|-[0-9a-f])*$"
|
||||
pattern: "^rtc(@.*|-([0-9]|[1-9][0-9]+))?$"
|
||||
|
||||
aux-voltage-chargeable:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
@@ -47,8 +47,6 @@ properties:
|
||||
- isil,isl1218
|
||||
# Intersil ISL12022 Real-time Clock
|
||||
- isil,isl12022
|
||||
# Loongson-2K Socs/LS7A bridge Real-time Clock
|
||||
- loongson,ls2x-rtc
|
||||
# Real Time Clock Module with I2C-Bus
|
||||
- microcrystal,rv3029
|
||||
# Real Time Clock
|
||||
|
||||
@@ -46,7 +46,7 @@ Supported adapters:
|
||||
* Intel Emmitsburg (PCH)
|
||||
* Intel Alder Lake (PCH)
|
||||
* Intel Raptor Lake (PCH)
|
||||
* Intel Meteor Lake (SOC)
|
||||
* Intel Meteor Lake (SOC and PCH)
|
||||
|
||||
Datasheets: Publicly available at the Intel website
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ LEDs
|
||||
uleds
|
||||
|
||||
leds-blinkm
|
||||
leds-cht-wcove
|
||||
leds-el15203000
|
||||
leds-lm3556
|
||||
leds-lp3944
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
===========================================================
|
||||
Kernel driver for Intel Cherry Trail Whiskey Cove PMIC LEDs
|
||||
===========================================================
|
||||
|
||||
/sys/class/leds/<led>/hw_pattern
|
||||
--------------------------------
|
||||
|
||||
Specify a hardware pattern for the Whiskey Cove PMIC LEDs.
|
||||
|
||||
The only supported pattern is hardware breathing mode::
|
||||
|
||||
"0 2000 1 2000"
|
||||
|
||||
^
|
||||
|
|
||||
Max-| ---
|
||||
| / \
|
||||
| / \
|
||||
| / \ /
|
||||
| / \ /
|
||||
Min-|- ---
|
||||
|
|
||||
0------2------4--> time (sec)
|
||||
|
||||
The rise and fall times must be the same value.
|
||||
Supported values are 2000, 1000, 500 and 250 for
|
||||
breathing frequencies of 1/4, 1/2, 1 and 2 Hz.
|
||||
|
||||
The set pattern only controls the timing. For max brightness the last
|
||||
set brightness is used and the max brightness can be changed
|
||||
while breathing by writing the brightness attribute.
|
||||
|
||||
This is just like how blinking works in the LED subsystem,
|
||||
for both sw and hw blinking the brightness can also be changed
|
||||
while blinking. Breathing on this hw really is just a variant
|
||||
mode of blinking.
|
||||
@@ -58,6 +58,7 @@ LEDs on notebook body, indicating that sound input / output is muted.
|
||||
|
||||
* System notification
|
||||
|
||||
Good: "rgb:status"
|
||||
Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)
|
||||
Legacy: "lp5523:{r,g,b}" (Nokia N900)
|
||||
|
||||
@@ -65,7 +66,7 @@ Phones usually have multi-color status LED.
|
||||
|
||||
* Power management
|
||||
|
||||
Good: "platform:*:charging" (allwinner sun50i)
|
||||
Good: "platform:*:charging" (allwinner sun50i, leds-cht-wcove)
|
||||
|
||||
* Screen
|
||||
|
||||
|
||||
@@ -10890,7 +10890,6 @@ S: Maintained
|
||||
F: drivers/net/ethernet/sgi/ioc3-eth.c
|
||||
|
||||
IOMAP FILESYSTEM LIBRARY
|
||||
M: Christoph Hellwig <hch@infradead.org>
|
||||
M: Darrick J. Wong <djwong@kernel.org>
|
||||
L: linux-xfs@vger.kernel.org
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
|
||||
@@ -64,6 +64,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
struct uprobe_task *utask = current->utask;
|
||||
|
||||
WARN_ON_ONCE(current->thread.trap_no != UPROBE_TRAP_NR);
|
||||
current->thread.trap_no = utask->autask.saved_trap_no;
|
||||
|
||||
instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size);
|
||||
|
||||
@@ -101,6 +102,8 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
{
|
||||
struct uprobe_task *utask = current->utask;
|
||||
|
||||
current->thread.trap_no = utask->autask.saved_trap_no;
|
||||
|
||||
/*
|
||||
* Task has received a fatal signal, so reset back to probed
|
||||
* address.
|
||||
|
||||
+1
-11
@@ -304,16 +304,6 @@ config IRQSTACKS
|
||||
for handling hard and soft interrupts. This can help avoid
|
||||
overflowing the process kernel stacks.
|
||||
|
||||
config TLB_PTLOCK
|
||||
bool "Use page table locks in TLB fault handler"
|
||||
depends on SMP
|
||||
default n
|
||||
help
|
||||
Select this option to enable page table locking in the TLB
|
||||
fault handler. This ensures that page table entries are
|
||||
updated consistently on SMP machines at the expense of some
|
||||
loss in performance.
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool
|
||||
default y if SMP
|
||||
@@ -346,7 +336,7 @@ config NR_CPUS
|
||||
int "Maximum number of CPUs (2-32)"
|
||||
range 2 32
|
||||
depends on SMP
|
||||
default "4" if 64BIT
|
||||
default "8" if 64BIT
|
||||
default "16"
|
||||
|
||||
config KEXEC
|
||||
|
||||
@@ -10,3 +10,14 @@ config LIGHTWEIGHT_SPINLOCK_CHECK
|
||||
spinlock debugging you should choose the DEBUG_SPINLOCK option
|
||||
which will detect unitialized spinlocks too.
|
||||
If unsure say Y here.
|
||||
|
||||
config TLB_PTLOCK
|
||||
bool "Use page table locks in TLB fault handler"
|
||||
depends on SMP
|
||||
default n
|
||||
help
|
||||
Select this option to enable page table locking in the TLB
|
||||
fault handler. This ensures that page table entries are
|
||||
updated consistently on SMP machines at the expense of some
|
||||
loss in performance.
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ CONFIG_TUN=m
|
||||
# CONFIG_NET_VENDOR_AMD is not set
|
||||
# CONFIG_NET_VENDOR_ATHEROS is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_CISCO is not set
|
||||
CONFIG_NET_TULIP=y
|
||||
@@ -97,6 +96,7 @@ CONFIG_LASI_82596=y
|
||||
# CONFIG_NET_VENDOR_NVIDIA is not set
|
||||
# CONFIG_NET_VENDOR_OKI is not set
|
||||
# CONFIG_NET_VENDOR_QLOGIC is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_RDC is not set
|
||||
# CONFIG_NET_VENDOR_REALTEK is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
@@ -129,17 +129,53 @@ CONFIG_PRINTER=m
|
||||
CONFIG_PPDEV=m
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_I2C=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_HWMON=m
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_DP_CEC=y
|
||||
# CONFIG_DRM_I2C_CH7006 is not set
|
||||
# CONFIG_DRM_I2C_SIL164 is not set
|
||||
CONFIG_DRM_RADEON=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
# CONFIG_DRM_NOUVEAU_BACKLIGHT is not set
|
||||
CONFIG_DRM_VGEM=m
|
||||
CONFIG_DRM_UDL=m
|
||||
CONFIG_DRM_MGAG200=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_FOREIGN_ENDIAN=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_PM2=m
|
||||
CONFIG_FB_PM2_FIFO_DISCONNECT=y
|
||||
CONFIG_FB_NVIDIA=m
|
||||
CONFIG_FB_NVIDIA_I2C=y
|
||||
# CONFIG_FB_NVIDIA_BACKLIGHT is not set
|
||||
CONFIG_FB_RIVA=m
|
||||
CONFIG_FB_RIVA_I2C=y
|
||||
# CONFIG_FB_RIVA_BACKLIGHT is not set
|
||||
CONFIG_FB_MATROX=m
|
||||
CONFIG_FB_MATROX_MILLENIUM=y
|
||||
CONFIG_FB_MATROX_MYSTIQUE=y
|
||||
CONFIG_FB_MATROX_G=y
|
||||
CONFIG_FB_MATROX_I2C=m
|
||||
CONFIG_FB_MATROX_MAVEN=m
|
||||
CONFIG_FB_ATY128=m
|
||||
# CONFIG_FB_ATY128_BACKLIGHT is not set
|
||||
CONFIG_FB_ATY=m
|
||||
CONFIG_FB_ATY_CT=y
|
||||
CONFIG_FB_ATY_GX=y
|
||||
# CONFIG_FB_ATY_BACKLIGHT is not set
|
||||
CONFIG_FB_S3=m
|
||||
CONFIG_FB_SAVAGE=m
|
||||
CONFIG_FB_SAVAGE_I2C=y
|
||||
CONFIG_FB_SAVAGE_ACCEL=y
|
||||
CONFIG_FB_SIS=m
|
||||
CONFIG_FB_SIS_300=y
|
||||
CONFIG_FB_SIS_315=y
|
||||
CONFIG_FB_VOODOO1=m
|
||||
CONFIG_FB_TRIDENT=m
|
||||
CONFIG_FB_SMSCUFX=m
|
||||
CONFIG_FB_UDL=m
|
||||
CONFIG_DUMMY_CONSOLE_COLUMNS=128
|
||||
CONFIG_DUMMY_CONSOLE_ROWS=48
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
@@ -216,17 +252,17 @@ CONFIG_CIFS_XATTR=y
|
||||
CONFIG_CIFS_POSIX=y
|
||||
# CONFIG_CIFS_DEBUG is not set
|
||||
CONFIG_CRYPTO_TEST=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRC_T10DIF=y
|
||||
|
||||
@@ -20,9 +20,6 @@ CONFIG_USER_NS=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PA8X00=y
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_HPPB=y
|
||||
CONFIG_IOMMU_CCIO=y
|
||||
@@ -37,6 +34,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_BLK_DEV_INTEGRITY=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
# CONFIG_COMPACTION is not set
|
||||
CONFIG_MEMORY_FAILURE=y
|
||||
CONFIG_NET=y
|
||||
@@ -103,7 +101,6 @@ CONFIG_TUN=y
|
||||
# CONFIG_NET_VENDOR_AMD is not set
|
||||
# CONFIG_NET_VENDOR_ATHEROS is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_CISCO is not set
|
||||
CONFIG_NET_TULIP=y
|
||||
@@ -121,6 +118,7 @@ CONFIG_E1000=y
|
||||
# CONFIG_NET_VENDOR_OKI is not set
|
||||
CONFIG_QLA3XXX=m
|
||||
CONFIG_QLCNIC=m
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_RDC is not set
|
||||
# CONFIG_NET_VENDOR_REALTEK is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
@@ -186,7 +184,6 @@ CONFIG_WATCHDOG=y
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
CONFIG_SSB=m
|
||||
CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_HTC_PASIC3=m
|
||||
CONFIG_LPC_SCH=m
|
||||
CONFIG_MFD_SM501=m
|
||||
CONFIG_REGULATOR=y
|
||||
@@ -196,14 +193,46 @@ CONFIG_MEDIA_SUPPORT=m
|
||||
CONFIG_AGP=y
|
||||
CONFIG_AGP_PARISC=y
|
||||
CONFIG_DRM=y
|
||||
# CONFIG_DRM_I2C_CH7006 is not set
|
||||
# CONFIG_DRM_I2C_SIL164 is not set
|
||||
CONFIG_DRM_RADEON=y
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
# CONFIG_DRM_NOUVEAU_BACKLIGHT is not set
|
||||
CONFIG_DRM_MGAG200=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_MATROX=y
|
||||
CONFIG_FB_PM2=m
|
||||
CONFIG_FB_PM2_FIFO_DISCONNECT=y
|
||||
CONFIG_FB_NVIDIA=m
|
||||
CONFIG_FB_NVIDIA_I2C=y
|
||||
# CONFIG_FB_NVIDIA_BACKLIGHT is not set
|
||||
CONFIG_FB_RIVA=m
|
||||
CONFIG_FB_RIVA_I2C=y
|
||||
# CONFIG_FB_RIVA_BACKLIGHT is not set
|
||||
CONFIG_FB_MATROX=m
|
||||
CONFIG_FB_MATROX_MILLENIUM=y
|
||||
CONFIG_FB_MATROX_MYSTIQUE=y
|
||||
CONFIG_FB_MATROX_G=y
|
||||
CONFIG_FB_MATROX_I2C=y
|
||||
CONFIG_FB_MATROX_MAVEN=y
|
||||
CONFIG_FB_MATROX_I2C=m
|
||||
CONFIG_FB_MATROX_MAVEN=m
|
||||
CONFIG_FB_RADEON=y
|
||||
# CONFIG_FB_RADEON_BACKLIGHT is not set
|
||||
CONFIG_FB_ATY128=m
|
||||
# CONFIG_FB_ATY128_BACKLIGHT is not set
|
||||
CONFIG_FB_ATY=m
|
||||
CONFIG_FB_ATY_CT=y
|
||||
CONFIG_FB_ATY_GX=y
|
||||
# CONFIG_FB_ATY_BACKLIGHT is not set
|
||||
CONFIG_FB_S3=m
|
||||
CONFIG_FB_SAVAGE=m
|
||||
CONFIG_FB_SAVAGE_I2C=y
|
||||
CONFIG_FB_SAVAGE_ACCEL=y
|
||||
CONFIG_FB_SIS=m
|
||||
CONFIG_FB_SIS_300=y
|
||||
CONFIG_FB_SIS_315=y
|
||||
CONFIG_FB_VOODOO1=m
|
||||
CONFIG_FB_TRIDENT=m
|
||||
CONFIG_FB_SMSCUFX=m
|
||||
CONFIG_FB_UDL=m
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_CLUT224 is not set
|
||||
CONFIG_HIDRAW=y
|
||||
@@ -257,12 +286,12 @@ CONFIG_NLS_ISO8859_1=m
|
||||
CONFIG_NLS_ISO8859_2=m
|
||||
CONFIG_NLS_UTF8=m
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_CRC_CCITT=m
|
||||
|
||||
@@ -31,6 +31,11 @@ static inline unsigned long arch_local_irq_save(void)
|
||||
|
||||
static inline void arch_local_irq_restore(unsigned long flags)
|
||||
{
|
||||
/* warn if IRQs are on although they should be off */
|
||||
if (IS_ENABLED(CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK))
|
||||
if (arch_local_save_flags() & PSW_I)
|
||||
asm volatile("break 6,6\n"); /* SPINLOCK_BREAK_INSN */
|
||||
|
||||
asm volatile("mtsm %0" : : "r" (flags) : "memory");
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ int pdc_iodc_print(const unsigned char *str, unsigned count);
|
||||
|
||||
void pdc_emergency_unlock(void);
|
||||
int pdc_sti_call(unsigned long func, unsigned long flags,
|
||||
unsigned long inptr, unsigned long outputr,
|
||||
unsigned long glob_cfg);
|
||||
unsigned long inptr, unsigned long outputr,
|
||||
unsigned long glob_cfg, int do_call64);
|
||||
|
||||
int __pdc_cpu_rendezvous(void);
|
||||
void pdc_cpu_rendezvous_lock(void);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/threads.h>
|
||||
#include <linux/irqreturn.h>
|
||||
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/prefetch.h>
|
||||
@@ -291,6 +292,40 @@ extern void __noreturn toc_intr(struct pt_regs *regs);
|
||||
extern void toc_handler(void);
|
||||
extern unsigned int toc_handler_size;
|
||||
extern unsigned int toc_handler_csum;
|
||||
extern void do_cpu_irq_mask(struct pt_regs *);
|
||||
extern irqreturn_t timer_interrupt(int, void *);
|
||||
extern irqreturn_t ipi_interrupt(int, void *);
|
||||
|
||||
/* called from assembly code: */
|
||||
extern void start_parisc(void);
|
||||
extern void smp_callin(unsigned long);
|
||||
extern void sys_rt_sigreturn(struct pt_regs *, int);
|
||||
extern void do_notify_resume(struct pt_regs *, long);
|
||||
extern long do_syscall_trace_enter(struct pt_regs *);
|
||||
extern void do_syscall_trace_exit(struct pt_regs *);
|
||||
|
||||
/* CPU startup and info */
|
||||
struct seq_file;
|
||||
extern void early_trap_init(void);
|
||||
extern void collect_boot_cpu_data(void);
|
||||
extern int show_cpuinfo (struct seq_file *m, void *v);
|
||||
|
||||
/* driver code in driver/parisc */
|
||||
extern void gsc_init(void);
|
||||
extern void processor_init(void);
|
||||
extern void ccio_init(void);
|
||||
extern void hppb_init(void);
|
||||
extern void dino_init(void);
|
||||
extern void iosapic_init(void);
|
||||
extern void lba_init(void);
|
||||
extern void sba_init(void);
|
||||
extern void parisc_eisa_init(void);
|
||||
struct parisc_device;
|
||||
struct resource;
|
||||
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
|
||||
extern void sba_directed_lmmio(struct parisc_device *, struct resource *);
|
||||
extern void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask);
|
||||
extern void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_CACHECTL
|
||||
#define _ASM_CACHECTL
|
||||
|
||||
/*
|
||||
* Options for cacheflush system call
|
||||
*/
|
||||
#define ICACHE (1<<0) /* flush instruction cache */
|
||||
#define DCACHE (1<<1) /* writeback and flush data cache */
|
||||
#define BCACHE (ICACHE|DCACHE) /* flush both caches */
|
||||
|
||||
#endif /* _ASM_CACHECTL */
|
||||
@@ -40,11 +40,6 @@ int audit_classify_arch(int arch)
|
||||
|
||||
int audit_classify_syscall(int abi, unsigned syscall)
|
||||
{
|
||||
#ifdef CONFIG_COMPAT
|
||||
extern int parisc32_classify_syscall(unsigned);
|
||||
if (abi == AUDIT_ARCH_PARISC)
|
||||
return parisc32_classify_syscall(syscall);
|
||||
#endif
|
||||
switch (syscall) {
|
||||
case __NR_open:
|
||||
return AUDITSC_OPEN;
|
||||
@@ -55,6 +50,10 @@ int audit_classify_syscall(int abi, unsigned syscall)
|
||||
case __NR_openat2:
|
||||
return AUDITSC_OPENAT2;
|
||||
default:
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (abi == AUDIT_ARCH_PARISC)
|
||||
return AUDITSC_COMPAT;
|
||||
#endif
|
||||
return AUDITSC_NATIVE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/mm.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <asm/pdc.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/cacheflush.h>
|
||||
@@ -28,6 +29,7 @@
|
||||
#include <asm/sections.h>
|
||||
#include <asm/shmparam.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cachectl.h>
|
||||
|
||||
int split_tlb __ro_after_init;
|
||||
int dcache_stride __ro_after_init;
|
||||
@@ -790,3 +792,50 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
|
||||
flush_tlb_kernel_range(start, end);
|
||||
}
|
||||
EXPORT_SYMBOL(invalidate_kernel_vmap_range);
|
||||
|
||||
|
||||
SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
|
||||
unsigned int, cache)
|
||||
{
|
||||
unsigned long start, end;
|
||||
ASM_EXCEPTIONTABLE_VAR(error);
|
||||
|
||||
if (bytes == 0)
|
||||
return 0;
|
||||
if (!access_ok((void __user *) addr, bytes))
|
||||
return -EFAULT;
|
||||
|
||||
end = addr + bytes;
|
||||
|
||||
if (cache & DCACHE) {
|
||||
start = addr;
|
||||
__asm__ __volatile__ (
|
||||
#ifdef CONFIG_64BIT
|
||||
"1: cmpb,*<<,n %0,%2,1b\n"
|
||||
#else
|
||||
"1: cmpb,<<,n %0,%2,1b\n"
|
||||
#endif
|
||||
" fic,m %3(%4,%0)\n"
|
||||
"2: sync\n"
|
||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b)
|
||||
: "+r" (start), "+r" (error)
|
||||
: "r" (end), "r" (dcache_stride), "i" (SR_USER));
|
||||
}
|
||||
|
||||
if (cache & ICACHE && error == 0) {
|
||||
start = addr;
|
||||
__asm__ __volatile__ (
|
||||
#ifdef CONFIG_64BIT
|
||||
"1: cmpb,*<<,n %0,%2,1b\n"
|
||||
#else
|
||||
"1: cmpb,<<,n %0,%2,1b\n"
|
||||
#endif
|
||||
" fdc,m %3(%4,%0)\n"
|
||||
"2: sync\n"
|
||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b)
|
||||
: "+r" (start), "+r" (error)
|
||||
: "r" (end), "r" (icache_stride), "i" (SR_USER));
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -26,19 +26,3 @@ unsigned int parisc32_signal_class[] = {
|
||||
#include <asm-generic/audit_signal.h>
|
||||
~0U
|
||||
};
|
||||
|
||||
int parisc32_classify_syscall(unsigned syscall)
|
||||
{
|
||||
switch (syscall) {
|
||||
case __NR_open:
|
||||
return AUDITSC_OPEN;
|
||||
case __NR_openat:
|
||||
return AUDITSC_OPENAT;
|
||||
case __NR_execve:
|
||||
return AUDITSC_EXECVE;
|
||||
case __NR_openat2:
|
||||
return AUDITSC_OPENAT2;
|
||||
default:
|
||||
return AUDITSC_COMPAT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Copyright (c) 1999 The Puffin Group
|
||||
* Copyright (c) 2001 Matthew Wilcox for Hewlett Packard
|
||||
* Copyright (c) 2001 Helge Deller <deller@gmx.de>
|
||||
* Copyright (c) 2001-2023 Helge Deller <deller@gmx.de>
|
||||
* Copyright (c) 2001,2002 Ryan Bradetich
|
||||
* Copyright (c) 2004-2005 Thibaut VARENE <varenet@parisc-linux.org>
|
||||
*
|
||||
@@ -74,13 +74,13 @@ static int descend_children(struct device * dev, void * data)
|
||||
}
|
||||
|
||||
/**
|
||||
* for_each_padev - Iterate over all devices in the tree
|
||||
* @fn: Function to call for each device.
|
||||
* @data: Data to pass to the called function.
|
||||
* for_each_padev - Iterate over all devices in the tree
|
||||
* @fn: Function to call for each device.
|
||||
* @data: Data to pass to the called function.
|
||||
*
|
||||
* This performs a depth-first traversal of the tree, calling the
|
||||
* function passed for each node. It calls the function for parents
|
||||
* before children.
|
||||
* This performs a depth-first traversal of the tree, calling the
|
||||
* function passed for each node. It calls the function for parents
|
||||
* before children.
|
||||
*/
|
||||
|
||||
static int for_each_padev(int (*fn)(struct device *, void *), void * data)
|
||||
@@ -280,7 +280,7 @@ int __init machine_has_merced_bus(void)
|
||||
|
||||
/**
|
||||
* find_pa_parent_type - Find a parent of a specific type
|
||||
* @dev: The device to start searching from
|
||||
* @padev: The device to start searching from
|
||||
* @type: The device type to search for.
|
||||
*
|
||||
* Walks up the device tree looking for a device of the specified type.
|
||||
@@ -344,8 +344,8 @@ static char *print_hwpath(struct hardware_path *path, char *output)
|
||||
|
||||
/**
|
||||
* print_pa_hwpath - Returns hardware path for PA devices
|
||||
* dev: The device to return the path for
|
||||
* output: Pointer to a previously-allocated array to place the path in.
|
||||
* @dev: The device to return the path for
|
||||
* @output: Pointer to a previously-allocated array to place the path in.
|
||||
*
|
||||
* This function fills in the output array with a human-readable path
|
||||
* to a PA device. This string is compatible with that used by PDC, and
|
||||
@@ -379,8 +379,8 @@ EXPORT_SYMBOL(get_pci_node_path);
|
||||
|
||||
/**
|
||||
* print_pci_hwpath - Returns hardware path for PCI devices
|
||||
* dev: The device to return the path for
|
||||
* output: Pointer to a previously-allocated array to place the path in.
|
||||
* @dev: The device to return the path for
|
||||
* @output: Pointer to a previously-allocated array to place the path in.
|
||||
*
|
||||
* This function fills in the output array with a human-readable path
|
||||
* to a PCI device. This string is compatible with that used by PDC, and
|
||||
@@ -415,7 +415,8 @@ static void setup_bus_id(struct parisc_device *padev)
|
||||
dev_set_name(&padev->dev, name);
|
||||
}
|
||||
|
||||
struct parisc_device * __init create_tree_node(char id, struct device *parent)
|
||||
static struct parisc_device * __init create_tree_node(char id,
|
||||
struct device *parent)
|
||||
{
|
||||
struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
@@ -741,7 +742,7 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
|
||||
};
|
||||
|
||||
if (device_for_each_child(parent, &recurse_data, descend_children))
|
||||
/* nothing */;
|
||||
{ /* nothing */ };
|
||||
|
||||
return d.dev;
|
||||
}
|
||||
@@ -771,8 +772,8 @@ EXPORT_SYMBOL(hwpath_to_device);
|
||||
|
||||
/**
|
||||
* device_to_hwpath - Populates the hwpath corresponding to the given device.
|
||||
* @param dev the target device
|
||||
* @param path pointer to a previously allocated hwpath struct to be filled in
|
||||
* @dev: the target device
|
||||
* @path: pointer to a previously allocated hwpath struct to be filled in
|
||||
*/
|
||||
void device_to_hwpath(struct device *dev, struct hardware_path *path)
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ static unsigned long f_extend(unsigned long address)
|
||||
|
||||
/**
|
||||
* convert_to_wide - Convert the return buffer addresses into kernel addresses.
|
||||
* @address: The return buffer from PDC.
|
||||
* @addr: The return buffer from PDC.
|
||||
*
|
||||
* This function is used to convert the return buffer addresses retrieved from PDC
|
||||
* into kernel addresses when the PDC address size and kernel address size are
|
||||
@@ -160,6 +160,8 @@ void set_firmware_width_unlocked(void)
|
||||
|
||||
ret = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES,
|
||||
__pa(pdc_result), 0);
|
||||
if (ret < 0)
|
||||
return;
|
||||
convert_to_wide(pdc_result);
|
||||
if (pdc_result[0] != NARROW_FIRMWARE)
|
||||
parisc_narrow_firmware = 0;
|
||||
@@ -255,8 +257,8 @@ int __init pdc_instr(unsigned int *instr)
|
||||
|
||||
/**
|
||||
* pdc_chassis_info - Return chassis information.
|
||||
* @result: The return buffer.
|
||||
* @chassis_info: The memory buffer address.
|
||||
* @led_info: The size of the memory buffer address.
|
||||
* @len: The size of the memory buffer address.
|
||||
*
|
||||
* An HVERSION dependent call for returning the chassis information.
|
||||
@@ -280,7 +282,8 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf
|
||||
|
||||
/**
|
||||
* pdc_pat_chassis_send_log - Sends a PDC PAT CHASSIS log message.
|
||||
* @retval: -1 on error, 0 on success. Other value are PDC errors
|
||||
* @state: state of the machine
|
||||
* @data: value for that state
|
||||
*
|
||||
* Must be correctly formatted or expect system crash
|
||||
*/
|
||||
@@ -303,7 +306,7 @@ int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
|
||||
|
||||
/**
|
||||
* pdc_chassis_disp - Updates chassis code
|
||||
* @retval: -1 on error, 0 on success
|
||||
* @disp: value to show on display
|
||||
*/
|
||||
int pdc_chassis_disp(unsigned long disp)
|
||||
{
|
||||
@@ -318,8 +321,7 @@ int pdc_chassis_disp(unsigned long disp)
|
||||
}
|
||||
|
||||
/**
|
||||
* pdc_cpu_rendenzvous - Stop currently executing CPU
|
||||
* @retval: -1 on error, 0 on success
|
||||
* __pdc_cpu_rendezvous - Stop currently executing CPU and do not return.
|
||||
*/
|
||||
int __pdc_cpu_rendezvous(void)
|
||||
{
|
||||
@@ -347,7 +349,7 @@ void pdc_cpu_rendezvous_unlock(void)
|
||||
|
||||
/**
|
||||
* pdc_pat_get_PDC_entrypoint - Get PDC entry point for current CPU
|
||||
* @retval: -1 on error, 0 on success
|
||||
* @pdc_entry: pointer to where the PDC entry point should be stored
|
||||
*/
|
||||
int pdc_pat_get_PDC_entrypoint(unsigned long *pdc_entry)
|
||||
{
|
||||
@@ -369,7 +371,7 @@ int pdc_pat_get_PDC_entrypoint(unsigned long *pdc_entry)
|
||||
}
|
||||
/**
|
||||
* pdc_chassis_warn - Fetches chassis warnings
|
||||
* @retval: -1 on error, 0 on success
|
||||
* @warn: The warning value to be shown
|
||||
*/
|
||||
int pdc_chassis_warn(unsigned long *warn)
|
||||
{
|
||||
@@ -521,6 +523,7 @@ int pdc_model_info(struct pdc_model *model)
|
||||
|
||||
/**
|
||||
* pdc_model_sysmodel - Get the system model name.
|
||||
* @os_id: The operating system ID asked for (an OS_ID_* value)
|
||||
* @name: A char array of at least 81 characters.
|
||||
*
|
||||
* Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L).
|
||||
@@ -549,7 +552,7 @@ int pdc_model_sysmodel(unsigned int os_id, char *name)
|
||||
|
||||
/**
|
||||
* pdc_model_versions - Identify the version number of each processor.
|
||||
* @cpu_id: The return buffer.
|
||||
* @versions: The return buffer.
|
||||
* @id: The id of the processor to check.
|
||||
*
|
||||
* Returns the version number for each processor component.
|
||||
@@ -996,8 +999,8 @@ int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl)
|
||||
|
||||
/**
|
||||
* pdc_pci_config_read - read PCI config space.
|
||||
* @hpa token from PDC to indicate which PCI device
|
||||
* @pci_addr configuration space address to read from
|
||||
* @hpa: Token from PDC to indicate which PCI device
|
||||
* @cfg_addr: Configuration space address to read from
|
||||
*
|
||||
* Read PCI Configuration space *before* linux PCI subsystem is running.
|
||||
*/
|
||||
@@ -1019,9 +1022,9 @@ unsigned int pdc_pci_config_read(void *hpa, unsigned long cfg_addr)
|
||||
|
||||
/**
|
||||
* pdc_pci_config_write - read PCI config space.
|
||||
* @hpa token from PDC to indicate which PCI device
|
||||
* @pci_addr configuration space address to write
|
||||
* @val value we want in the 32-bit register
|
||||
* @hpa: Token from PDC to indicate which PCI device
|
||||
* @cfg_addr: Configuration space address to write
|
||||
* @val: Value we want in the 32-bit register
|
||||
*
|
||||
* Write PCI Configuration space *before* linux PCI subsystem is running.
|
||||
*/
|
||||
@@ -1389,17 +1392,25 @@ int pdc_iodc_getc(void)
|
||||
}
|
||||
|
||||
int pdc_sti_call(unsigned long func, unsigned long flags,
|
||||
unsigned long inptr, unsigned long outputr,
|
||||
unsigned long glob_cfg)
|
||||
unsigned long inptr, unsigned long outputr,
|
||||
unsigned long glob_cfg, int do_call64)
|
||||
{
|
||||
int retval;
|
||||
int retval = 0;
|
||||
unsigned long irqflags;
|
||||
|
||||
spin_lock_irqsave(&pdc_lock, irqflags);
|
||||
retval = real32_call(func, flags, inptr, outputr, glob_cfg);
|
||||
spin_unlock_irqrestore(&pdc_lock, irqflags);
|
||||
spin_lock_irqsave(&pdc_lock, irqflags);
|
||||
if (IS_ENABLED(CONFIG_64BIT) && do_call64) {
|
||||
#ifdef CONFIG_64BIT
|
||||
retval = real64_call(func, flags, inptr, outputr, glob_cfg);
|
||||
#else
|
||||
WARN_ON(1);
|
||||
#endif
|
||||
} else {
|
||||
retval = real32_call(func, flags, inptr, outputr, glob_cfg);
|
||||
}
|
||||
spin_unlock_irqrestore(&pdc_lock, irqflags);
|
||||
|
||||
return retval;
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL(pdc_sti_call);
|
||||
|
||||
@@ -1549,7 +1560,7 @@ int pdc_pat_get_irt(void *r_addr, unsigned long cell_num)
|
||||
|
||||
/**
|
||||
* pdc_pat_pd_get_addr_map - Retrieve information about memory address ranges.
|
||||
* @actlen: The return buffer.
|
||||
* @actual_len: The return buffer.
|
||||
* @mem_addr: Pointer to the memory buffer.
|
||||
* @count: The number of bytes to read from the buffer.
|
||||
* @offset: The offset with respect to the beginning of the buffer.
|
||||
@@ -1572,7 +1583,7 @@ int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr,
|
||||
}
|
||||
|
||||
/**
|
||||
* pdc_pat_pd_get_PDC_interface_revisions - Retrieve PDC interface revisions.
|
||||
* pdc_pat_pd_get_pdc_revisions - Retrieve PDC interface revisions.
|
||||
* @legacy_rev: The legacy revision.
|
||||
* @pat_rev: The PAT revision.
|
||||
* @pdc_cap: The PDC capabilities.
|
||||
@@ -1627,7 +1638,7 @@ int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr)
|
||||
* pdc_pat_io_pci_cfg_write - Retrieve information about memory address ranges.
|
||||
* @pci_addr: PCI configuration space address for which the write request is being made.
|
||||
* @pci_size: Size of write in bytes. Valid values are 1, 2, and 4.
|
||||
* @value: Pointer to 1, 2, or 4 byte value in low order end of argument to be
|
||||
* @val: Pointer to 1, 2, or 4 byte value in low order end of argument to be
|
||||
* written to PCI Config space.
|
||||
*
|
||||
*/
|
||||
@@ -1645,7 +1656,7 @@ int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val)
|
||||
}
|
||||
|
||||
/**
|
||||
* pdc_pat_mem_pdc_info - Retrieve information about page deallocation table
|
||||
* pdc_pat_mem_pdt_info - Retrieve information about page deallocation table
|
||||
* @rinfo: memory pdt information
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
|
||||
#undef PARISC_IRQ_CR16_COUNTS
|
||||
|
||||
extern irqreturn_t timer_interrupt(int, void *);
|
||||
extern irqreturn_t ipi_interrupt(int, void *);
|
||||
|
||||
#define EIEM_MASK(irq) (1UL<<(CPU_IRQ_MAX - irq))
|
||||
|
||||
/* Bits in EIEM correlate with cpu_irq_action[].
|
||||
@@ -489,7 +486,7 @@ void do_softirq_own_stack(void)
|
||||
#endif /* CONFIG_IRQSTACKS */
|
||||
|
||||
/* ONLY called from entry.S:intr_extint() */
|
||||
void do_cpu_irq_mask(struct pt_regs *regs)
|
||||
asmlinkage void do_cpu_irq_mask(struct pt_regs *regs)
|
||||
{
|
||||
struct pt_regs *old_regs;
|
||||
unsigned long eirr_val;
|
||||
|
||||
@@ -845,7 +845,7 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
const char *strtab = NULL;
|
||||
const Elf_Shdr *s;
|
||||
char *secstrings;
|
||||
int symindex = -1;
|
||||
int symindex __maybe_unused = -1;
|
||||
Elf_Sym *newptr, *oldptr;
|
||||
Elf_Shdr *symhdr = NULL;
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -245,7 +245,7 @@ static void unmap_uncached_pages(unsigned long vaddr, unsigned long size)
|
||||
PCXL_SEARCH_LOOP(idx, mask, size); \
|
||||
}
|
||||
|
||||
unsigned long
|
||||
static unsigned long
|
||||
pcxl_alloc_range(size_t size)
|
||||
{
|
||||
int res_idx;
|
||||
|
||||
@@ -40,7 +40,7 @@ static unsigned int pdc_chassis_enabled __read_mostly = 1;
|
||||
|
||||
/**
|
||||
* pdc_chassis_setup() - Enable/disable pdc_chassis code at boot time.
|
||||
* @str configuration param: 0 to disable chassis log
|
||||
* @str: configuration param: 0 to disable chassis log
|
||||
* @return 1
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,6 @@ __setup("pdcchassis=", pdc_chassis_setup);
|
||||
|
||||
/**
|
||||
* pdc_chassis_checkold() - Checks for old PDC_CHASSIS compatibility
|
||||
* @pdc_chassis_old: 1 if old pdc chassis style
|
||||
*
|
||||
* Currently, only E class and A180 are known to work with this.
|
||||
* Inspired by Christoph Plattner
|
||||
@@ -80,6 +79,9 @@ static void __init pdc_chassis_checkold(void)
|
||||
|
||||
/**
|
||||
* pdc_chassis_panic_event() - Called by the panic handler.
|
||||
* @this: unused
|
||||
* @event: unused
|
||||
* @ptr: unused
|
||||
*
|
||||
* As soon as a panic occurs, we should inform the PDC.
|
||||
*/
|
||||
@@ -88,7 +90,7 @@ static int pdc_chassis_panic_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
|
||||
return NOTIFY_DONE;
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +101,10 @@ static struct notifier_block pdc_chassis_panic_block = {
|
||||
|
||||
|
||||
/**
|
||||
* parisc_reboot_event() - Called by the reboot handler.
|
||||
* pdc_chassis_reboot_event() - Called by the reboot handler.
|
||||
* @this: unused
|
||||
* @event: unused
|
||||
* @ptr: unused
|
||||
*
|
||||
* As soon as a reboot occurs, we should inform the PDC.
|
||||
*/
|
||||
@@ -108,7 +113,7 @@ static int pdc_chassis_reboot_event(struct notifier_block *this,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
|
||||
return NOTIFY_DONE;
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +153,7 @@ void __init parisc_pdc_chassis_init(void)
|
||||
/**
|
||||
* pdc_chassis_send_status() - Sends a predefined message to the chassis,
|
||||
* and changes the front panel LEDs according to the new system state
|
||||
* @retval: PDC call return value.
|
||||
* @message: Type of message, one of PDC_CHASSIS_DIRECT_* values.
|
||||
*
|
||||
* Only machines with 64 bits PDC PAT and those reported in
|
||||
* pdc_chassis_checkold() are supported atm.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <asm/pdc.h>
|
||||
#include <asm/pdcpat.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
enum pdt_access_type {
|
||||
PDT_NONE,
|
||||
|
||||
@@ -288,7 +288,7 @@ static ssize_t perf_read(struct file *file, char __user *buf, size_t cnt, loff_t
|
||||
static ssize_t perf_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
size_t image_size;
|
||||
size_t image_size __maybe_unused;
|
||||
uint32_t image_type;
|
||||
uint32_t interface_type;
|
||||
uint32_t test;
|
||||
|
||||
@@ -58,7 +58,7 @@ DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
|
||||
*/
|
||||
|
||||
/**
|
||||
* init_cpu_profiler - enable/setup per cpu profiling hooks.
|
||||
* init_percpu_prof - enable/setup per cpu profiling hooks.
|
||||
* @cpunum: The processor instance.
|
||||
*
|
||||
* FIXME: doesn't do much yet...
|
||||
|
||||
@@ -45,7 +45,7 @@ struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
|
||||
struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
|
||||
struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
|
||||
|
||||
void __init setup_cmdline(char **cmdline_p)
|
||||
static void __init setup_cmdline(char **cmdline_p)
|
||||
{
|
||||
extern unsigned int boot_args[];
|
||||
char *p;
|
||||
@@ -86,7 +86,7 @@ void __init setup_cmdline(char **cmdline_p)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PA11
|
||||
void __init dma_ops_init(void)
|
||||
static void __init dma_ops_init(void)
|
||||
{
|
||||
switch (boot_cpu_data.cpu_type) {
|
||||
case pcx:
|
||||
@@ -106,8 +106,6 @@ void __init dma_ops_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void collect_boot_cpu_data(void);
|
||||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
#ifdef CONFIG_64BIT
|
||||
@@ -167,10 +165,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
/*
|
||||
* Display CPU info for all CPUs.
|
||||
* for parisc this is in processor.c
|
||||
*/
|
||||
extern int show_cpuinfo (struct seq_file *m, void *v);
|
||||
|
||||
static void *
|
||||
c_start (struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
@@ -295,16 +290,6 @@ static int __init parisc_init_resources(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void gsc_init(void);
|
||||
extern void processor_init(void);
|
||||
extern void ccio_init(void);
|
||||
extern void hppb_init(void);
|
||||
extern void dino_init(void);
|
||||
extern void iosapic_init(void);
|
||||
extern void lba_init(void);
|
||||
extern void sba_init(void);
|
||||
extern void eisa_init(void);
|
||||
|
||||
static int __init parisc_init(void)
|
||||
{
|
||||
u32 osid = (OS_ID_LINUX << 16);
|
||||
@@ -370,7 +355,7 @@ static int __init parisc_init(void)
|
||||
gsc_init();
|
||||
#endif
|
||||
#ifdef CONFIG_EISA
|
||||
eisa_init();
|
||||
parisc_eisa_init();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HPPB)
|
||||
@@ -391,8 +376,6 @@ arch_initcall(parisc_init);
|
||||
|
||||
void __init start_parisc(void)
|
||||
{
|
||||
extern void early_trap_init(void);
|
||||
|
||||
int ret, cpunum;
|
||||
struct pdc_coproc_cfg coproc_cfg;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs)
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
asmlinkage void
|
||||
sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
|
||||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
@@ -176,7 +176,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
|
||||
}
|
||||
|
||||
static long
|
||||
setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, int in_syscall)
|
||||
setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, long in_syscall)
|
||||
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
@@ -211,7 +211,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, int in_sysc
|
||||
|
||||
static long
|
||||
setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
|
||||
int in_syscall)
|
||||
long in_syscall)
|
||||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
unsigned long rp, usp;
|
||||
@@ -380,7 +380,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
|
||||
*/
|
||||
|
||||
static void
|
||||
handle_signal(struct ksignal *ksig, struct pt_regs *regs, int in_syscall)
|
||||
handle_signal(struct ksignal *ksig, struct pt_regs *regs, long in_syscall)
|
||||
{
|
||||
int ret;
|
||||
sigset_t *oldset = sigmask_to_save();
|
||||
@@ -578,7 +578,7 @@ static void do_signal(struct pt_regs *regs, long in_syscall)
|
||||
restore_saved_sigmask();
|
||||
}
|
||||
|
||||
void do_notify_resume(struct pt_regs *regs, long in_syscall)
|
||||
asmlinkage void do_notify_resume(struct pt_regs *regs, long in_syscall)
|
||||
{
|
||||
if (test_thread_flag(TIF_SIGPENDING) ||
|
||||
test_thread_flag(TIF_NOTIFY_SIGNAL))
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/personality.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/elf-randomize.h>
|
||||
|
||||
/*
|
||||
* Construct an artificial page offset for the mapping based on the physical
|
||||
@@ -339,7 +340,7 @@ asmlinkage long parisc_fallocate(int fd, int mode, u32 offhi, u32 offlo,
|
||||
((u64)lenhi << 32) | lenlo);
|
||||
}
|
||||
|
||||
long parisc_personality(unsigned long personality)
|
||||
asmlinkage long parisc_personality(unsigned long personality)
|
||||
{
|
||||
long err;
|
||||
|
||||
|
||||
@@ -400,6 +400,7 @@
|
||||
353 common pkey_free sys_pkey_free
|
||||
354 common rseq sys_rseq
|
||||
355 common kexec_file_load sys_kexec_file_load sys_kexec_file_load
|
||||
356 common cacheflush sys_cacheflush
|
||||
# up to 402 is unassigned and reserved for arch specific syscalls
|
||||
403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime
|
||||
404 32 clock_settime64 sys_clock_settime sys_clock_settime
|
||||
|
||||
@@ -338,7 +338,7 @@ static void default_trap(int code, struct pt_regs *regs)
|
||||
void (*cpu_lpmc) (int code, struct pt_regs *regs) __read_mostly = default_trap;
|
||||
|
||||
|
||||
void transfer_pim_to_trap_frame(struct pt_regs *regs)
|
||||
static void transfer_pim_to_trap_frame(struct pt_regs *regs)
|
||||
{
|
||||
register int i;
|
||||
extern unsigned int hpmc_pim_data[];
|
||||
@@ -800,14 +800,13 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
}
|
||||
|
||||
|
||||
void __init initialize_ivt(const void *iva)
|
||||
static void __init initialize_ivt(const void *iva)
|
||||
{
|
||||
extern const u32 os_hpmc[];
|
||||
|
||||
int i;
|
||||
u32 check = 0;
|
||||
u32 *ivap;
|
||||
u32 *hpmcp;
|
||||
u32 instr;
|
||||
|
||||
if (strcmp((const char *)iva, "cows can fly"))
|
||||
@@ -840,8 +839,6 @@ void __init initialize_ivt(const void *iva)
|
||||
/* Setup IVA and compute checksum for HPMC handler */
|
||||
ivap[6] = (u32)__pa(os_hpmc);
|
||||
|
||||
hpmcp = (u32 *)os_hpmc;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
check += ivap[i];
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/signal.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <asm/hardirq.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
|
||||
@@ -24,12 +24,13 @@
|
||||
#include <asm/unwind.h>
|
||||
#include <asm/switch_to.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/ftrace.h>
|
||||
|
||||
/* #define DEBUG 1 */
|
||||
#ifdef DEBUG
|
||||
#define dbg(x...) pr_debug(x)
|
||||
#else
|
||||
#define dbg(x...)
|
||||
#define dbg(x...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define KERNEL_START (KERNEL_BINARY_TEXT_START)
|
||||
@@ -179,7 +180,7 @@ void unwind_table_remove(struct unwind_table *table)
|
||||
/* Called from setup_arch to import the kernel unwind info */
|
||||
int __init unwind_init(void)
|
||||
{
|
||||
long start, stop;
|
||||
long start __maybe_unused, stop __maybe_unused;
|
||||
register unsigned long gp __asm__ ("r27");
|
||||
|
||||
start = (long)&__start___unwind[0];
|
||||
|
||||
@@ -626,12 +626,10 @@ static void __init pagetable_init(void)
|
||||
|
||||
for (range = 0; range < npmem_ranges; range++) {
|
||||
unsigned long start_paddr;
|
||||
unsigned long end_paddr;
|
||||
unsigned long size;
|
||||
|
||||
start_paddr = pmem_ranges[range].start_pfn << PAGE_SHIFT;
|
||||
size = pmem_ranges[range].pages << PAGE_SHIFT;
|
||||
end_paddr = start_paddr + size;
|
||||
|
||||
map_pages((unsigned long)__va(start_paddr), start_paddr,
|
||||
size, PAGE_KERNEL, 0);
|
||||
|
||||
@@ -853,9 +853,9 @@ efi_set_virtual_address_map(unsigned long memory_map_size,
|
||||
|
||||
/* Disable interrupts around EFI calls: */
|
||||
local_irq_save(flags);
|
||||
status = efi_call(efi.runtime->set_virtual_address_map,
|
||||
memory_map_size, descriptor_size,
|
||||
descriptor_version, virtual_map);
|
||||
status = arch_efi_call_virt(efi.runtime, set_virtual_address_map,
|
||||
memory_map_size, descriptor_size,
|
||||
descriptor_version, virtual_map);
|
||||
local_irq_restore(flags);
|
||||
|
||||
efi_fpu_end();
|
||||
|
||||
@@ -376,12 +376,11 @@ static enum fw_upload_err rsu_update_init(struct m10bmc_sec *sec)
|
||||
u32 doorbell_reg, progress, status;
|
||||
int ret, err;
|
||||
|
||||
ret = regmap_update_bits(sec->m10bmc->regmap,
|
||||
csr_map->base + csr_map->doorbell,
|
||||
DRBL_RSU_REQUEST | DRBL_HOST_STATUS,
|
||||
DRBL_RSU_REQUEST |
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_IDLE));
|
||||
ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell,
|
||||
DRBL_RSU_REQUEST | DRBL_HOST_STATUS,
|
||||
DRBL_RSU_REQUEST |
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_IDLE));
|
||||
if (ret)
|
||||
return FW_UPLOAD_ERR_RW_ERROR;
|
||||
|
||||
@@ -450,11 +449,10 @@ static enum fw_upload_err rsu_send_data(struct m10bmc_sec *sec)
|
||||
u32 doorbell_reg, status;
|
||||
int ret;
|
||||
|
||||
ret = regmap_update_bits(sec->m10bmc->regmap,
|
||||
csr_map->base + csr_map->doorbell,
|
||||
DRBL_HOST_STATUS,
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_WRITE_DONE));
|
||||
ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell,
|
||||
DRBL_HOST_STATUS,
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_WRITE_DONE));
|
||||
if (ret)
|
||||
return FW_UPLOAD_ERR_RW_ERROR;
|
||||
|
||||
@@ -517,11 +515,10 @@ static enum fw_upload_err rsu_cancel(struct m10bmc_sec *sec)
|
||||
if (rsu_prog(doorbell) != RSU_PROG_READY)
|
||||
return FW_UPLOAD_ERR_BUSY;
|
||||
|
||||
ret = regmap_update_bits(sec->m10bmc->regmap,
|
||||
csr_map->base + csr_map->doorbell,
|
||||
DRBL_HOST_STATUS,
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_ABORT_RSU));
|
||||
ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell,
|
||||
DRBL_HOST_STATUS,
|
||||
FIELD_PREP(DRBL_HOST_STATUS,
|
||||
HOST_STATUS_ABORT_RSU));
|
||||
if (ret)
|
||||
return FW_UPLOAD_ERR_RW_ERROR;
|
||||
|
||||
@@ -547,21 +544,28 @@ static enum fw_upload_err m10bmc_sec_prepare(struct fw_upload *fwl,
|
||||
if (ret != FW_UPLOAD_ERR_NONE)
|
||||
goto unlock_flash;
|
||||
|
||||
m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_PREPARE);
|
||||
|
||||
ret = rsu_update_init(sec);
|
||||
if (ret != FW_UPLOAD_ERR_NONE)
|
||||
goto unlock_flash;
|
||||
goto fw_state_exit;
|
||||
|
||||
ret = rsu_prog_ready(sec);
|
||||
if (ret != FW_UPLOAD_ERR_NONE)
|
||||
goto unlock_flash;
|
||||
goto fw_state_exit;
|
||||
|
||||
if (sec->cancel_request) {
|
||||
ret = rsu_cancel(sec);
|
||||
goto unlock_flash;
|
||||
goto fw_state_exit;
|
||||
}
|
||||
|
||||
m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_WRITE);
|
||||
|
||||
return FW_UPLOAD_ERR_NONE;
|
||||
|
||||
fw_state_exit:
|
||||
m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_NORMAL);
|
||||
|
||||
unlock_flash:
|
||||
if (sec->m10bmc->flash_bulk_ops)
|
||||
sec->m10bmc->flash_bulk_ops->unlock_write(sec->m10bmc);
|
||||
@@ -610,6 +614,8 @@ static enum fw_upload_err m10bmc_sec_poll_complete(struct fw_upload *fwl)
|
||||
if (sec->cancel_request)
|
||||
return rsu_cancel(sec);
|
||||
|
||||
m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_PROGRAM);
|
||||
|
||||
result = rsu_send_data(sec);
|
||||
if (result != FW_UPLOAD_ERR_NONE)
|
||||
return result;
|
||||
@@ -653,6 +659,8 @@ static void m10bmc_sec_cleanup(struct fw_upload *fwl)
|
||||
|
||||
(void)rsu_cancel(sec);
|
||||
|
||||
m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_NORMAL);
|
||||
|
||||
if (sec->m10bmc->flash_bulk_ops)
|
||||
sec->m10bmc->flash_bulk_ops->unlock_write(sec->m10bmc);
|
||||
}
|
||||
@@ -764,3 +772,4 @@ module_platform_driver(intel_m10bmc_sec_driver);
|
||||
MODULE_AUTHOR("Intel Corporation");
|
||||
MODULE_DESCRIPTION("Intel MAX10 BMC Secure Update");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(INTEL_M10_BMC_CORE);
|
||||
|
||||
@@ -794,3 +794,4 @@ MODULE_DEVICE_TABLE(platform, intel_m10bmc_hwmon_ids);
|
||||
MODULE_AUTHOR("Intel Corporation");
|
||||
MODULE_DESCRIPTION("Intel MAX 10 BMC hardware monitor");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(INTEL_M10_BMC_CORE);
|
||||
|
||||
@@ -157,7 +157,7 @@ config I2C_I801
|
||||
Emmitsburg (PCH)
|
||||
Alder Lake (PCH)
|
||||
Raptor Lake (PCH)
|
||||
Meteor Lake (SOC)
|
||||
Meteor Lake (SOC and PCH)
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called i2c-i801.
|
||||
@@ -1025,7 +1025,7 @@ config I2C_RZV2M
|
||||
depends on ARCH_RENESAS || COMPILE_TEST
|
||||
help
|
||||
If you say yes to this option, support will be included for the
|
||||
Renesas RZ/V2M I2C interface.
|
||||
Renesas RZ/V2M I2C interface.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called i2c-rzv2m.
|
||||
|
||||
@@ -465,14 +465,12 @@ static int altr_i2c_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int altr_i2c_remove(struct platform_device *pdev)
|
||||
static void altr_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct altr_i2c_dev *idev = platform_get_drvdata(pdev);
|
||||
|
||||
clk_disable_unprepare(idev->i2c_clk);
|
||||
i2c_del_adapter(&idev->adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Match table for of_platform binding */
|
||||
@@ -484,7 +482,7 @@ MODULE_DEVICE_TABLE(of, altr_i2c_of_match);
|
||||
|
||||
static struct platform_driver altr_i2c_driver = {
|
||||
.probe = altr_i2c_probe,
|
||||
.remove = altr_i2c_remove,
|
||||
.remove_new = altr_i2c_remove,
|
||||
.driver = {
|
||||
.name = "altera-i2c",
|
||||
.of_match_table = altr_i2c_of_match,
|
||||
|
||||
@@ -322,7 +322,7 @@ static int i2c_amd_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int i2c_amd_remove(struct platform_device *pdev)
|
||||
static void i2c_amd_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct amd_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
|
||||
struct amd_i2c_common *i2c_common = &i2c_dev->common;
|
||||
@@ -336,7 +336,6 @@ static int i2c_amd_remove(struct platform_device *pdev)
|
||||
i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER);
|
||||
|
||||
i2c_del_adapter(&i2c_dev->adap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct acpi_device_id i2c_amd_acpi_match[] = {
|
||||
@@ -347,7 +346,7 @@ MODULE_DEVICE_TABLE(acpi, i2c_amd_acpi_match);
|
||||
|
||||
static struct platform_driver i2c_amd_plat_driver = {
|
||||
.probe = i2c_amd_probe,
|
||||
.remove = i2c_amd_remove,
|
||||
.remove_new = i2c_amd_remove,
|
||||
.driver = {
|
||||
.name = "i2c_amd_mp2",
|
||||
.acpi_match_table = ACPI_PTR(i2c_amd_acpi_match),
|
||||
|
||||
@@ -1061,7 +1061,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aspeed_i2c_remove_bus(struct platform_device *pdev)
|
||||
static void aspeed_i2c_remove_bus(struct platform_device *pdev)
|
||||
{
|
||||
struct aspeed_i2c_bus *bus = platform_get_drvdata(pdev);
|
||||
unsigned long flags;
|
||||
@@ -1077,13 +1077,11 @@ static int aspeed_i2c_remove_bus(struct platform_device *pdev)
|
||||
reset_control_assert(bus->rst);
|
||||
|
||||
i2c_del_adapter(&bus->adap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver aspeed_i2c_bus_driver = {
|
||||
.probe = aspeed_i2c_probe_bus,
|
||||
.remove = aspeed_i2c_remove_bus,
|
||||
.remove_new = aspeed_i2c_remove_bus,
|
||||
.driver = {
|
||||
.name = "aspeed-i2c-bus",
|
||||
.of_match_table = aspeed_i2c_bus_of_table,
|
||||
|
||||
@@ -273,7 +273,7 @@ static int at91_twi_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int at91_twi_remove(struct platform_device *pdev)
|
||||
static void at91_twi_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct at91_twi_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -282,8 +282,6 @@ static int at91_twi_remove(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_disable(dev->dev);
|
||||
pm_runtime_set_suspended(dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused at91_twi_runtime_suspend(struct device *dev)
|
||||
@@ -342,7 +340,7 @@ static const struct dev_pm_ops __maybe_unused at91_twi_pm = {
|
||||
|
||||
static struct platform_driver at91_twi_driver = {
|
||||
.probe = at91_twi_probe,
|
||||
.remove = at91_twi_remove,
|
||||
.remove_new = at91_twi_remove,
|
||||
.id_table = at91_twi_devtypes,
|
||||
.driver = {
|
||||
.name = "at91_i2c",
|
||||
|
||||
@@ -334,13 +334,12 @@ i2c_au1550_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int i2c_au1550_remove(struct platform_device *pdev)
|
||||
static void i2c_au1550_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(&priv->adap);
|
||||
i2c_au1550_disable(priv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -379,7 +378,7 @@ static struct platform_driver au1xpsc_smbus_driver = {
|
||||
.pm = AU1XPSC_SMBUS_PMOPS,
|
||||
},
|
||||
.probe = i2c_au1550_probe,
|
||||
.remove = i2c_au1550_remove,
|
||||
.remove_new = i2c_au1550_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(au1xpsc_smbus_driver);
|
||||
|
||||
@@ -804,14 +804,12 @@ error_disable_clk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int axxia_i2c_remove(struct platform_device *pdev)
|
||||
static void axxia_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct axxia_i2c_dev *idev = platform_get_drvdata(pdev);
|
||||
|
||||
clk_disable_unprepare(idev->i2c_clk);
|
||||
i2c_del_adapter(&idev->adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Match table for of_platform binding */
|
||||
@@ -824,7 +822,7 @@ MODULE_DEVICE_TABLE(of, axxia_i2c_of_match);
|
||||
|
||||
static struct platform_driver axxia_i2c_driver = {
|
||||
.probe = axxia_i2c_probe,
|
||||
.remove = axxia_i2c_remove,
|
||||
.remove_new = axxia_i2c_remove,
|
||||
.driver = {
|
||||
.name = "axxia-i2c",
|
||||
.of_match_table = axxia_i2c_of_match,
|
||||
|
||||
@@ -1107,7 +1107,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
|
||||
return i2c_add_adapter(adap);
|
||||
}
|
||||
|
||||
static int bcm_iproc_i2c_remove(struct platform_device *pdev)
|
||||
static void bcm_iproc_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct bcm_iproc_i2c_dev *iproc_i2c = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -1123,8 +1123,6 @@ static int bcm_iproc_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
i2c_del_adapter(&iproc_i2c->adapter);
|
||||
bcm_iproc_i2c_enable_disable(iproc_i2c, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -1260,7 +1258,7 @@ static struct platform_driver bcm_iproc_i2c_driver = {
|
||||
.pm = BCM_IPROC_I2C_PM_OPS,
|
||||
},
|
||||
.probe = bcm_iproc_i2c_probe,
|
||||
.remove = bcm_iproc_i2c_remove,
|
||||
.remove_new = bcm_iproc_i2c_remove,
|
||||
};
|
||||
module_platform_driver(bcm_iproc_i2c_driver);
|
||||
|
||||
|
||||
@@ -859,13 +859,11 @@ probe_disable_clk:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int bcm_kona_i2c_remove(struct platform_device *pdev)
|
||||
static void bcm_kona_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct bcm_kona_i2c_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(&dev->adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id bcm_kona_i2c_of_match[] = {
|
||||
@@ -880,7 +878,7 @@ static struct platform_driver bcm_kona_i2c_driver = {
|
||||
.of_match_table = bcm_kona_i2c_of_match,
|
||||
},
|
||||
.probe = bcm_kona_i2c_probe,
|
||||
.remove = bcm_kona_i2c_remove,
|
||||
.remove_new = bcm_kona_i2c_remove,
|
||||
};
|
||||
module_platform_driver(bcm_kona_i2c_driver);
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ err_put_exclusive_rate:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int bcm2835_i2c_remove(struct platform_device *pdev)
|
||||
static void bcm2835_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct bcm2835_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -512,8 +512,6 @@ static int bcm2835_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
free_irq(i2c_dev->irq, i2c_dev);
|
||||
i2c_del_adapter(&i2c_dev->adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id bcm2835_i2c_of_match[] = {
|
||||
@@ -525,7 +523,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match);
|
||||
|
||||
static struct platform_driver bcm2835_i2c_driver = {
|
||||
.probe = bcm2835_i2c_probe,
|
||||
.remove = bcm2835_i2c_remove,
|
||||
.remove_new = bcm2835_i2c_remove,
|
||||
.driver = {
|
||||
.name = "i2c-bcm2835",
|
||||
.of_match_table = bcm2835_i2c_of_match,
|
||||
|
||||
@@ -690,12 +690,11 @@ probe_errorout:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int brcmstb_i2c_remove(struct platform_device *pdev)
|
||||
static void brcmstb_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct brcmstb_i2c_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(&dev->adapter);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -736,7 +735,7 @@ static struct platform_driver brcmstb_i2c_driver = {
|
||||
.pm = &brcmstb_i2c_pm,
|
||||
},
|
||||
.probe = brcmstb_i2c_probe,
|
||||
.remove = brcmstb_i2c_remove,
|
||||
.remove_new = brcmstb_i2c_remove,
|
||||
};
|
||||
module_platform_driver(brcmstb_i2c_driver);
|
||||
|
||||
|
||||
@@ -1415,7 +1415,7 @@ err_clk_dis:
|
||||
*
|
||||
* Return: 0 always
|
||||
*/
|
||||
static int cdns_i2c_remove(struct platform_device *pdev)
|
||||
static void cdns_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cdns_i2c *id = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -1427,8 +1427,6 @@ static int cdns_i2c_remove(struct platform_device *pdev)
|
||||
clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
|
||||
reset_control_assert(id->reset);
|
||||
clk_disable_unprepare(id->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver cdns_i2c_drv = {
|
||||
@@ -1438,7 +1436,7 @@ static struct platform_driver cdns_i2c_drv = {
|
||||
.pm = &cdns_i2c_dev_pm_ops,
|
||||
},
|
||||
.probe = cdns_i2c_probe,
|
||||
.remove = cdns_i2c_remove,
|
||||
.remove_new = cdns_i2c_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(cdns_i2c_drv);
|
||||
|
||||
@@ -200,13 +200,11 @@ static const struct i2c_algorithm cbus_i2c_algo = {
|
||||
.functionality = cbus_i2c_func,
|
||||
};
|
||||
|
||||
static int cbus_i2c_remove(struct platform_device *pdev)
|
||||
static void cbus_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct i2c_adapter *adapter = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cbus_i2c_probe(struct platform_device *pdev)
|
||||
@@ -266,7 +264,7 @@ MODULE_DEVICE_TABLE(of, i2c_cbus_dt_ids);
|
||||
|
||||
static struct platform_driver cbus_i2c_driver = {
|
||||
.probe = cbus_i2c_probe,
|
||||
.remove = cbus_i2c_remove,
|
||||
.remove_new = cbus_i2c_remove,
|
||||
.driver = {
|
||||
.name = "i2c-cbus-gpio",
|
||||
.of_match_table = of_match_ptr(i2c_cbus_dt_ids),
|
||||
|
||||
@@ -529,15 +529,13 @@ remove_irq_domain:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
|
||||
static void cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_unregister_device(adap->client);
|
||||
i2c_del_adapter(&adap->adapter);
|
||||
irq_domain_remove(adap->irq_domain);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
|
||||
@@ -548,7 +546,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table);
|
||||
|
||||
static struct platform_driver cht_wc_i2c_adap_driver = {
|
||||
.probe = cht_wc_i2c_adap_i2c_probe,
|
||||
.remove = cht_wc_i2c_adap_i2c_remove,
|
||||
.remove_new = cht_wc_i2c_adap_i2c_remove,
|
||||
.driver = {
|
||||
.name = "cht_wcove_ext_chgr",
|
||||
},
|
||||
|
||||
@@ -676,7 +676,7 @@ out_free:
|
||||
return result;
|
||||
}
|
||||
|
||||
static int cpm_i2c_remove(struct platform_device *ofdev)
|
||||
static void cpm_i2c_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct cpm_i2c *cpm = platform_get_drvdata(ofdev);
|
||||
|
||||
@@ -685,8 +685,6 @@ static int cpm_i2c_remove(struct platform_device *ofdev)
|
||||
cpm_i2c_shutdown(cpm);
|
||||
|
||||
kfree(cpm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id cpm_i2c_match[] = {
|
||||
@@ -703,7 +701,7 @@ MODULE_DEVICE_TABLE(of, cpm_i2c_match);
|
||||
|
||||
static struct platform_driver cpm_i2c_driver = {
|
||||
.probe = cpm_i2c_probe,
|
||||
.remove = cpm_i2c_remove,
|
||||
.remove_new = cpm_i2c_remove,
|
||||
.driver = {
|
||||
.name = "fsl-i2c-cpm",
|
||||
.of_match_table = cpm_i2c_match,
|
||||
|
||||
@@ -283,13 +283,11 @@ static int ec_i2c_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ec_i2c_remove(struct platform_device *dev)
|
||||
static void ec_i2c_remove(struct platform_device *dev)
|
||||
{
|
||||
struct ec_i2c_device *bus = platform_get_drvdata(dev);
|
||||
|
||||
i2c_del_adapter(&bus->adap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id cros_ec_i2c_of_match[] __maybe_unused = {
|
||||
@@ -306,7 +304,7 @@ MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_tunnel_acpi_id);
|
||||
|
||||
static struct platform_driver ec_i2c_tunnel_driver = {
|
||||
.probe = ec_i2c_probe,
|
||||
.remove = ec_i2c_remove,
|
||||
.remove_new = ec_i2c_remove,
|
||||
.driver = {
|
||||
.name = "cros-ec-i2c-tunnel",
|
||||
.acpi_match_table = ACPI_PTR(cros_ec_i2c_tunnel_acpi_id),
|
||||
|
||||
@@ -767,12 +767,9 @@ static int davinci_i2c_probe(struct platform_device *pdev)
|
||||
if (irq < 0)
|
||||
return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
|
||||
|
||||
dev = devm_kzalloc(&pdev->dev, sizeof(struct davinci_i2c_dev),
|
||||
GFP_KERNEL);
|
||||
if (!dev) {
|
||||
dev_err(&pdev->dev, "Memory allocation failed\n");
|
||||
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
init_completion(&dev->cmd_complete);
|
||||
|
||||
@@ -885,7 +882,7 @@ err_pm:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int davinci_i2c_remove(struct platform_device *pdev)
|
||||
static void davinci_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct davinci_i2c_dev *dev = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
@@ -894,17 +891,15 @@ static int davinci_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
i2c_del_adapter(&dev->adapter);
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
|
||||
dev_err(&pdev->dev, "Failed to resume device\n");
|
||||
else
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
|
||||
|
||||
pm_runtime_dont_use_autosuspend(dev->dev);
|
||||
pm_runtime_put_sync(dev->dev);
|
||||
pm_runtime_disable(dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -940,12 +935,16 @@ static const struct dev_pm_ops davinci_i2c_pm = {
|
||||
#define davinci_i2c_pm_ops NULL
|
||||
#endif
|
||||
|
||||
/* work with hotplug and coldplug */
|
||||
MODULE_ALIAS("platform:i2c_davinci");
|
||||
static const struct platform_device_id davinci_i2c_driver_ids[] = {
|
||||
{ .name = "i2c_davinci", },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids);
|
||||
|
||||
static struct platform_driver davinci_i2c_driver = {
|
||||
.probe = davinci_i2c_probe,
|
||||
.remove = davinci_i2c_remove,
|
||||
.remove_new = davinci_i2c_remove,
|
||||
.id_table = davinci_i2c_driver_ids,
|
||||
.driver = {
|
||||
.name = "i2c_davinci",
|
||||
.pm = davinci_i2c_pm_ops,
|
||||
|
||||
@@ -575,6 +575,14 @@ int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)
|
||||
unsigned int param;
|
||||
int ret;
|
||||
|
||||
/* DW_IC_COMP_PARAM_1 not implement for IP issue */
|
||||
if ((dev->flags & MODEL_MASK) == MODEL_WANGXUN_SP) {
|
||||
dev->tx_fifo_depth = TXGBE_TX_FIFO_DEPTH;
|
||||
dev->rx_fifo_depth = TXGBE_RX_FIFO_DEPTH;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to detect the FIFO depth if not set by interface driver,
|
||||
* the depth could be from 2 to 256 from HW spec.
|
||||
|
||||
@@ -304,6 +304,7 @@ struct dw_i2c_dev {
|
||||
#define MODEL_MSCC_OCELOT BIT(8)
|
||||
#define MODEL_BAIKAL_BT1 BIT(9)
|
||||
#define MODEL_AMD_NAVI_GPU BIT(10)
|
||||
#define MODEL_WANGXUN_SP BIT(11)
|
||||
#define MODEL_MASK GENMASK(11, 8)
|
||||
|
||||
/*
|
||||
@@ -313,6 +314,9 @@ struct dw_i2c_dev {
|
||||
#define AMD_UCSI_INTR_REG 0x474
|
||||
#define AMD_UCSI_INTR_EN 0xd
|
||||
|
||||
#define TXGBE_TX_FIFO_DEPTH 4
|
||||
#define TXGBE_RX_FIFO_DEPTH 0
|
||||
|
||||
struct i2c_dw_semaphore_callbacks {
|
||||
int (*probe)(struct dw_i2c_dev *dev);
|
||||
void (*remove)(struct dw_i2c_dev *dev);
|
||||
|
||||
@@ -354,6 +354,68 @@ static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int i2c_dw_poll_tx_empty(struct dw_i2c_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
return regmap_read_poll_timeout(dev->map, DW_IC_RAW_INTR_STAT, val,
|
||||
val & DW_IC_INTR_TX_EMPTY,
|
||||
100, 1000);
|
||||
}
|
||||
|
||||
static int i2c_dw_poll_rx_full(struct dw_i2c_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
return regmap_read_poll_timeout(dev->map, DW_IC_RAW_INTR_STAT, val,
|
||||
val & DW_IC_INTR_RX_FULL,
|
||||
100, 1000);
|
||||
}
|
||||
|
||||
static int txgbe_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
||||
int num_msgs)
|
||||
{
|
||||
struct dw_i2c_dev *dev = i2c_get_adapdata(adap);
|
||||
int msg_idx, buf_len, data_idx, ret;
|
||||
unsigned int val, stop = 0;
|
||||
u8 *buf;
|
||||
|
||||
dev->msgs = msgs;
|
||||
dev->msgs_num = num_msgs;
|
||||
i2c_dw_xfer_init(dev);
|
||||
regmap_write(dev->map, DW_IC_INTR_MASK, 0);
|
||||
|
||||
for (msg_idx = 0; msg_idx < num_msgs; msg_idx++) {
|
||||
buf = msgs[msg_idx].buf;
|
||||
buf_len = msgs[msg_idx].len;
|
||||
|
||||
for (data_idx = 0; data_idx < buf_len; data_idx++) {
|
||||
if (msg_idx == num_msgs - 1 && data_idx == buf_len - 1)
|
||||
stop |= BIT(9);
|
||||
|
||||
if (msgs[msg_idx].flags & I2C_M_RD) {
|
||||
regmap_write(dev->map, DW_IC_DATA_CMD, 0x100 | stop);
|
||||
|
||||
ret = i2c_dw_poll_rx_full(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
regmap_read(dev->map, DW_IC_DATA_CMD, &val);
|
||||
buf[data_idx] = val;
|
||||
} else {
|
||||
ret = i2c_dw_poll_tx_empty(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
regmap_write(dev->map, DW_IC_DATA_CMD,
|
||||
buf[data_idx] | stop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return num_msgs;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initiate (and continue) low level master read/write transaction.
|
||||
* This function is only called from i2c_dw_isr, and pumping i2c_msg
|
||||
@@ -559,13 +621,19 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
|
||||
pm_runtime_get_sync(dev->dev);
|
||||
|
||||
/*
|
||||
* Initiate I2C message transfer when AMD NAVI GPU card is enabled,
|
||||
* Initiate I2C message transfer when polling mode is enabled,
|
||||
* As it is polling based transfer mechanism, which does not support
|
||||
* interrupt based functionalities of existing DesignWare driver.
|
||||
*/
|
||||
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
|
||||
switch (dev->flags & MODEL_MASK) {
|
||||
case MODEL_AMD_NAVI_GPU:
|
||||
ret = amd_i2c_dw_xfer_quirk(adap, msgs, num);
|
||||
goto done_nolock;
|
||||
case MODEL_WANGXUN_SP:
|
||||
ret = txgbe_i2c_dw_xfer_quirk(adap, msgs, num);
|
||||
goto done_nolock;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
reinit_completion(&dev->cmd_complete);
|
||||
@@ -848,7 +916,7 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int amd_i2c_adap_quirk(struct dw_i2c_dev *dev)
|
||||
static int i2c_dw_poll_adap_quirk(struct dw_i2c_dev *dev)
|
||||
{
|
||||
struct i2c_adapter *adap = &dev->adapter;
|
||||
int ret;
|
||||
@@ -862,6 +930,17 @@ static int amd_i2c_adap_quirk(struct dw_i2c_dev *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool i2c_dw_is_model_poll(struct dw_i2c_dev *dev)
|
||||
{
|
||||
switch (dev->flags & MODEL_MASK) {
|
||||
case MODEL_AMD_NAVI_GPU:
|
||||
case MODEL_WANGXUN_SP:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int i2c_dw_probe_master(struct dw_i2c_dev *dev)
|
||||
{
|
||||
struct i2c_adapter *adap = &dev->adapter;
|
||||
@@ -917,8 +996,8 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
|
||||
adap->dev.parent = dev->dev;
|
||||
i2c_set_adapdata(adap, dev);
|
||||
|
||||
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU)
|
||||
return amd_i2c_adap_quirk(dev);
|
||||
if (i2c_dw_is_model_poll(dev))
|
||||
return i2c_dw_poll_adap_quirk(dev);
|
||||
|
||||
if (dev->flags & ACCESS_NO_IRQ_SUSPEND) {
|
||||
irq_flags = IRQF_NO_SUSPEND;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -234,6 +235,16 @@ static const struct dev_pm_ops i2c_dw_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(i2c_dw_pci_runtime_suspend, i2c_dw_pci_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static const struct property_entry dgpu_properties[] = {
|
||||
/* USB-C doesn't power the system */
|
||||
PROPERTY_ENTRY_U8("scope", POWER_SUPPLY_SCOPE_DEVICE),
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct software_node dgpu_node = {
|
||||
.properties = dgpu_properties,
|
||||
};
|
||||
|
||||
static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
@@ -325,7 +336,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
|
||||
dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, NULL);
|
||||
dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
|
||||
if (IS_ERR(dev->slave))
|
||||
return dev_err_probe(dev->dev, PTR_ERR(dev->slave),
|
||||
"register UCSI failed\n");
|
||||
|
||||
@@ -168,6 +168,15 @@ static inline int dw_i2c_of_configure(struct platform_device *pdev)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int txgbe_i2c_request_regs(struct dw_i2c_dev *dev)
|
||||
{
|
||||
dev->map = dev_get_regmap(dev->dev->parent, NULL);
|
||||
if (!dev->map)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dw_i2c_plat_pm_cleanup(struct dw_i2c_dev *dev)
|
||||
{
|
||||
pm_runtime_disable(dev->dev);
|
||||
@@ -185,6 +194,9 @@ static int dw_i2c_plat_request_regs(struct dw_i2c_dev *dev)
|
||||
case MODEL_BAIKAL_BT1:
|
||||
ret = bt1_i2c_request_regs(dev);
|
||||
break;
|
||||
case MODEL_WANGXUN_SP:
|
||||
ret = txgbe_i2c_request_regs(dev);
|
||||
break;
|
||||
default:
|
||||
dev->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
ret = PTR_ERR_OR_ZERO(dev->base);
|
||||
@@ -277,6 +289,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
dev->flags = (uintptr_t)device_get_match_data(&pdev->dev);
|
||||
if (device_property_present(&pdev->dev, "wx,i2c-snps-model"))
|
||||
dev->flags = MODEL_WANGXUN_SP;
|
||||
|
||||
dev->dev = &pdev->dev;
|
||||
dev->irq = irq;
|
||||
platform_set_drvdata(pdev, dev);
|
||||
@@ -384,7 +399,7 @@ exit_reset:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dw_i2c_plat_remove(struct platform_device *pdev)
|
||||
static void dw_i2c_plat_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -401,8 +416,6 @@ static int dw_i2c_plat_remove(struct platform_device *pdev)
|
||||
i2c_dw_remove_lock_support(dev);
|
||||
|
||||
reset_control_assert(dev->rst);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -481,7 +494,7 @@ MODULE_ALIAS("platform:i2c_designware");
|
||||
|
||||
static struct platform_driver dw_i2c_driver = {
|
||||
.probe = dw_i2c_plat_probe,
|
||||
.remove = dw_i2c_plat_remove,
|
||||
.remove_new = dw_i2c_plat_remove,
|
||||
.driver = {
|
||||
.name = "i2c_designware",
|
||||
.of_match_table = of_match_ptr(dw_i2c_of_match),
|
||||
|
||||
@@ -347,14 +347,12 @@ static int dc_i2c_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dc_i2c_remove(struct platform_device *pdev)
|
||||
static void dc_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dc_i2c *i2c = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(&i2c->adap);
|
||||
clk_disable_unprepare(i2c->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id dc_i2c_match[] = {
|
||||
@@ -365,7 +363,7 @@ MODULE_DEVICE_TABLE(of, dc_i2c_match);
|
||||
|
||||
static struct platform_driver dc_i2c_driver = {
|
||||
.probe = dc_i2c_probe,
|
||||
.remove = dc_i2c_remove,
|
||||
.remove_new = dc_i2c_remove,
|
||||
.driver = {
|
||||
.name = "digicolor-i2c",
|
||||
.of_match_table = dc_i2c_match,
|
||||
|
||||
@@ -236,20 +236,18 @@ out_disable:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dln2_i2c_remove(struct platform_device *pdev)
|
||||
static void dln2_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dln2_i2c *dln2 = platform_get_drvdata(pdev);
|
||||
|
||||
i2c_del_adapter(&dln2->adapter);
|
||||
dln2_i2c_enable(dln2, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver dln2_i2c_driver = {
|
||||
.driver.name = "dln2-i2c",
|
||||
.probe = dln2_i2c_probe,
|
||||
.remove = dln2_i2c_remove,
|
||||
.remove_new = dln2_i2c_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(dln2_i2c_driver);
|
||||
|
||||
@@ -419,14 +419,12 @@ err_clk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int em_i2c_remove(struct platform_device *dev)
|
||||
static void em_i2c_remove(struct platform_device *dev)
|
||||
{
|
||||
struct em_i2c_device *priv = platform_get_drvdata(dev);
|
||||
|
||||
i2c_del_adapter(&priv->adap);
|
||||
clk_disable_unprepare(priv->sclk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id em_i2c_ids[] = {
|
||||
@@ -436,7 +434,7 @@ static const struct of_device_id em_i2c_ids[] = {
|
||||
|
||||
static struct platform_driver em_i2c_driver = {
|
||||
.probe = em_i2c_probe,
|
||||
.remove = em_i2c_remove,
|
||||
.remove_new = em_i2c_remove,
|
||||
.driver = {
|
||||
.name = "em-i2c",
|
||||
.of_match_table = em_i2c_ids,
|
||||
|
||||
@@ -882,7 +882,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int exynos5_i2c_remove(struct platform_device *pdev)
|
||||
static void exynos5_i2c_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct exynos5_i2c *i2c = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -890,8 +890,6 @@ static int exynos5_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
clk_unprepare(i2c->clk);
|
||||
clk_unprepare(i2c->pclk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -945,7 +943,7 @@ static const struct dev_pm_ops exynos5_i2c_dev_pm_ops = {
|
||||
|
||||
static struct platform_driver exynos5_i2c_driver = {
|
||||
.probe = exynos5_i2c_probe,
|
||||
.remove = exynos5_i2c_remove,
|
||||
.remove_new = exynos5_i2c_remove,
|
||||
.driver = {
|
||||
.name = "exynos5-hsi2c",
|
||||
.pm = &exynos5_i2c_dev_pm_ops,
|
||||
|
||||
@@ -475,7 +475,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int i2c_gpio_remove(struct platform_device *pdev)
|
||||
static void i2c_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct i2c_gpio_private_data *priv;
|
||||
struct i2c_adapter *adap;
|
||||
@@ -486,8 +486,6 @@ static int i2c_gpio_remove(struct platform_device *pdev)
|
||||
adap = &priv->adap;
|
||||
|
||||
i2c_del_adapter(adap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id i2c_gpio_dt_ids[] = {
|
||||
@@ -510,7 +508,7 @@ static struct platform_driver i2c_gpio_driver = {
|
||||
.acpi_match_table = i2c_gpio_acpi_match,
|
||||
},
|
||||
.probe = i2c_gpio_probe,
|
||||
.remove = i2c_gpio_remove,
|
||||
.remove_new = i2c_gpio_remove,
|
||||
};
|
||||
|
||||
static int __init i2c_gpio_init(void)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user