Loading arch/arm64/boot/dts/qcom/quin-vm-common.dtsi +6 −15 Original line number Diff line number Diff line /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -253,25 +253,16 @@ status = "ok"; }; spmi_bus: qcom,spmi { compatible = "qcom,viospmi-pmic-arb"; interrupt-names = "periph_irq"; interrupts = <GIC_SPI 481 IRQ_TYPE_NONE>; qcom,ee = <0>; qcom,channel = <0>; #address-cells = <2>; #size-cells = <0>; interrupt-controller; #interrupt-cells = <4>; cell-index = <0>; }; viospmi: virtio-spmi@1c800000 { spmi_bus: virtio-spmi@1c800000 { compatible = "virtio,mmio"; #address-cells = <1>; #size-cells = <1>; reg = <0x1c800000 0x1100>; interrupt-names = "periph_irq"; interrupts = <GIC_SPI 45 IRQ_TYPE_NONE>; interrupt-controller; #interrupt-cells = <4>; cell-index = <0>; status = "okay"; }; Loading drivers/spmi/viospmi-pmic-arb.c +207 −343 File changed.Preview size limit exceeded, changes collapsed. Show changes include/linux/virtio_spmi.h +6 −15 Original line number Diff line number Diff line /* Copyright (c) 2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -29,12 +29,13 @@ struct virtio_spmi_config { } __packed; struct payload_cmd { __virtio32 cmd; __virtio32 data[2]; }; struct payload_irq { __virtio32 ppid; __virtio32 val; __virtio16 ppid; __virtio32 regval; }; union payload_data { Loading @@ -44,19 +45,15 @@ union payload_data { struct virtio_spmi_msg { __virtio32 type; __virtio32 len; __virtio32 res; union { __virtio32 cmd; __virtio32 cnt; } u; union payload_data payload[]; union payload_data payload; }; /* Virtio SPMI message type */ enum vio_spmi_msg_type { VIO_SPMI_BUS_WRITE = 0, VIO_SPMI_BUS_READ = 1, VIO_SPMI_BUS_CMDMAX = 1, VIO_ACC_ENABLE_WR = 2, VIO_ACC_ENABLE_RD = 3, VIO_IRQ_CLEAR = 4, Loading @@ -68,10 +65,4 @@ enum vio_spmi_msg_res { VIO_SPMI_DONE = 0, VIO_SPMI_ERR = 1, }; /* payload fix size and one payload_data size */ #define MSG_FIX_SZ (sizeof(struct virtio_spmi_msg)) #define PER_PLD_SZ (sizeof(union payload_data)) #define MSG_SZ(x) (MSG_FIX_SZ + ((PER_PLD_SZ) * (x))) #endif /* _LINUX_VIRTIO_SPMI_H */ Loading
arch/arm64/boot/dts/qcom/quin-vm-common.dtsi +6 −15 Original line number Diff line number Diff line /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -253,25 +253,16 @@ status = "ok"; }; spmi_bus: qcom,spmi { compatible = "qcom,viospmi-pmic-arb"; interrupt-names = "periph_irq"; interrupts = <GIC_SPI 481 IRQ_TYPE_NONE>; qcom,ee = <0>; qcom,channel = <0>; #address-cells = <2>; #size-cells = <0>; interrupt-controller; #interrupt-cells = <4>; cell-index = <0>; }; viospmi: virtio-spmi@1c800000 { spmi_bus: virtio-spmi@1c800000 { compatible = "virtio,mmio"; #address-cells = <1>; #size-cells = <1>; reg = <0x1c800000 0x1100>; interrupt-names = "periph_irq"; interrupts = <GIC_SPI 45 IRQ_TYPE_NONE>; interrupt-controller; #interrupt-cells = <4>; cell-index = <0>; status = "okay"; }; Loading
drivers/spmi/viospmi-pmic-arb.c +207 −343 File changed.Preview size limit exceeded, changes collapsed. Show changes
include/linux/virtio_spmi.h +6 −15 Original line number Diff line number Diff line /* Copyright (c) 2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -29,12 +29,13 @@ struct virtio_spmi_config { } __packed; struct payload_cmd { __virtio32 cmd; __virtio32 data[2]; }; struct payload_irq { __virtio32 ppid; __virtio32 val; __virtio16 ppid; __virtio32 regval; }; union payload_data { Loading @@ -44,19 +45,15 @@ union payload_data { struct virtio_spmi_msg { __virtio32 type; __virtio32 len; __virtio32 res; union { __virtio32 cmd; __virtio32 cnt; } u; union payload_data payload[]; union payload_data payload; }; /* Virtio SPMI message type */ enum vio_spmi_msg_type { VIO_SPMI_BUS_WRITE = 0, VIO_SPMI_BUS_READ = 1, VIO_SPMI_BUS_CMDMAX = 1, VIO_ACC_ENABLE_WR = 2, VIO_ACC_ENABLE_RD = 3, VIO_IRQ_CLEAR = 4, Loading @@ -68,10 +65,4 @@ enum vio_spmi_msg_res { VIO_SPMI_DONE = 0, VIO_SPMI_ERR = 1, }; /* payload fix size and one payload_data size */ #define MSG_FIX_SZ (sizeof(struct virtio_spmi_msg)) #define PER_PLD_SZ (sizeof(union payload_data)) #define MSG_SZ(x) (MSG_FIX_SZ + ((PER_PLD_SZ) * (x))) #endif /* _LINUX_VIRTIO_SPMI_H */