2021-12-02 19:16:45

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH v2 0/5] platform: surface: Introduce Surface XBL Driver

Introduce the Surface Extensible Boot Loader driver for the Surface Duo.
Exposes information about the driver to user space via sysfs.

Signed-off-by: Jarrett Schultz <[email protected]>

---

Changes in v3:
- For the yaml documentation:
* Updated description
* Fixed examples
* Updated 'required' field
- Further propogated ACPI dependency in Kconfigs
- Updated sysfs several binding descriptions
- Renamed files to conform to naming conventions

---

Changes in v2:
- Per Maximilian, added patch 2: propagated ACPI dependency from the
directory as a whole to each individual driver
- For the yaml documentation:
* Removed json-schema dependence
* Elaborated on description of driver
* Updated example
- Changed target KernelVersion in sysfs documentation
- Updated MAINTAINER changes to be properly applied across patches
- For the driver itself,
* Added types.h inclusion and removed unused inclusions
* Minor updates to code and acronym style
* Remove __packed attribute on driver struct
* Use .dev_groups for sysfs
- Added more in-depth description of driver in Kconfig
- Modified dts to reference a newly added section in sm8150.dtsi

---
Jarrett Schultz (5):
dt-bindings: platform: microsoft: Document surface xbl
platform: surface: Propagate ACPI Dependency
platform: surface: Add surface xbl
arm64: dts: qcom: sm8150: Add imem section
arm64: dts: qcom: surface-duo: Add surface xbl

.../ABI/testing/sysfs-platform-surface-xbl | 79 ++++++++
.../platform/microsoft/surface-xbl.yaml | 69 +++++++
MAINTAINERS | 9 +
.../dts/qcom/sm8150-microsoft-surface-duo.dts | 10 +
arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 +
drivers/platform/surface/Kconfig | 19 +-
drivers/platform/surface/Makefile | 1 +
drivers/platform/surface/aggregator/Kconfig | 1 +
drivers/platform/surface/surface_xbl.c | 186 ++++++++++++++++++
9 files changed, 381 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ABI/testing/sysfs-platform-surface-xbl
create mode 100644 Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
create mode 100644 drivers/platform/surface/surface_xbl.c

--
2.25.1



2021-12-02 19:16:50

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH 1/5] dt-bindings: platform: microsoft: Document surface xbl

Introduce yaml for surface xbl driver.

Signed-off-by: Jarrett Schultz <[email protected]>

---

Changes in v3:
- Updated description to only pertain to the hardware
- Updated the required field to properly reflect the binding
- Removed the first example
- Fixed the size of the reg field in the second example

---

Changes in v2:
- Removed json-schema dependence
- Elaborated on description of driver
- Updated example
---
.../platform/microsoft/surface-xbl.yaml | 69 +++++++++++++++++++
MAINTAINERS | 7 ++
2 files changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml

diff --git a/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml b/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
new file mode 100644
index 000000000000..a661cfedd8fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/platform/microsoft/surface-xbl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Surface Extensible Bootloader for Microsoft Surface Duo
+
+maintainers:
+ - Jarrett Schultz <[email protected]>
+
+description: |
+ Defined to expose information that is used during production when
+ device is in manufacturing mode. Some of the information included
+ in this imem section is -
+ * board_id
+ * battery_present
+ * hw_init_retries
+ * is_customer_mode
+ * is_act_mode
+ * pmic_reset_reason
+ * touch_fw_version
+ * ocp_error_location
+ See sysfs documentation for more information.
+
+properties:
+ compatible:
+ const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ properties:
+ compatible:
+ const: microsoft,sm8150-surface-duo-xbl
+
+# reg:
+# maxItems: 1
+
+# additionalProperties: false
+
+# required:
+# - compatible
+# - reg
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - ranges
+ - "#address-cells"
+ - "#size-cells"
+
+examples:
+ - |
+ imem@146bf000 {
+ compatible = "simple-mfd";
+ reg = <0x146bf000 0x1000>;
+ ranges = <0x0 0x146bf000 0x1000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ xbl@a94 {
+ compatible = "microsoft,sm8150-surface-duo-xbl";
+ reg = <0xa94 0x100>;
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 913856599623..0daa416a2aba 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12650,6 +12650,13 @@ F: Documentation/driver-api/surface_aggregator/clients/dtx.rst
F: drivers/platform/surface/surface_dtx.c
F: include/uapi/linux/surface_aggregator/dtx.h

+MICROSOFT SURFACE DUO XBL DRIVER
+M: Jarrett Schultz <[email protected]>
+L: [email protected]
+L: [email protected]
+S: Supported
+F: Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
+
MICROSOFT SURFACE GPE LID SUPPORT DRIVER
M: Maximilian Luz <[email protected]>
L: [email protected]
--
2.25.1


2021-12-02 19:16:55

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH 5/5] arm64: dts: qcom: surface-duo: Add surface xbl

Introduce device tree source for the surface xbl driver.

Signed-off-by: Jarrett Schultz <[email protected]>

---

Changes in v3:
- N/A

---

Changes in v2:
- Updated to reference an offset inside of imem
---
.../boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts b/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts
index 5901c28e6696..abb7964daac4 100644
--- a/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts
+++ b/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts
@@ -430,6 +430,16 @@ &i2c19 {
/* MAX34417 @ 0x1e */
};

+&imem {
+ status = "okay";
+
+ xbl@a94 {
+ compatible = "microsoft,sm8150-surface-duo-xbl";
+ reg = <0xa94 0x100>;
+ status = "okay";
+ };
+};
+
&pon {
pwrkey {
status = "okay";
--
2.25.1


2021-12-02 19:16:59

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH 4/5] arm64: dts: qcom: sm8150: Add imem section

Introduce the imem section in preparation for the surface xbl driver.

Signed-off-by: Jarrett Schultz <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>

---
Changes in v3:
- N/A

---

Changes in v2:
- Created to properly reference the xbl section inside of imem
---
arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 81b4ff2cc4cd..bcfcb7306cdc 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1175,6 +1175,14 @@ gpi_dma1: dma-controller@a00000 {
status = "disabled";
};

+ imem: imem@146bf000 {
+ compatible = "simple-mfd";
+ reg = <0x0 0x146bf000 0x0 0x1000>;
+ ranges = <0x0 0x0 0x146bf000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
qupv3_id_1: geniqup@ac0000 {
compatible = "qcom,geni-se-qup";
reg = <0x0 0x00ac0000 0x0 0x6000>;
--
2.25.1


2021-12-02 19:17:01

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH 3/5] platform: surface: Add surface xbl

Introduce support for the Extensible Boot Loader driver found on the
Surface Duo. Makes device information available to users via sysfs.

Signed-off-by: Jarrett Schultz <[email protected]>

---

Changed in v3:
- Updated several descriptions in the yaml to be more descriptive
- Renamed files to use an underscore instead of a dash

---

Changes in v2:
- Added types.h inclusion and removed unused inclusions
- Minor updates to code and acronym style
- Remove __packed attribute on driver struct
- Use .dev_groups for sysfs
- Added more in-depth description of driver in Kconfig
- Changed target KernelVersion in sysfs documentation
---
.../ABI/testing/sysfs-platform-surface-xbl | 79 ++++++++
MAINTAINERS | 2 +
drivers/platform/surface/Kconfig | 12 ++
drivers/platform/surface/Makefile | 1 +
drivers/platform/surface/surface_xbl.c | 186 ++++++++++++++++++
5 files changed, 280 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-platform-surface-xbl
create mode 100644 drivers/platform/surface/surface_xbl.c

diff --git a/Documentation/ABI/testing/sysfs-platform-surface-xbl b/Documentation/ABI/testing/sysfs-platform-surface-xbl
new file mode 100644
index 000000000000..505a662d8511
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-surface-xbl
@@ -0,0 +1,79 @@
+What: /sys/devices/platform/146bfa94.xbl/battery_present
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns whether the battery is present. Valid
+ values are:
+ 0 - battery absent
+ 1 - battery present
+
+What: /sys/devices/platform/146bfa94.xbl/board_id
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns a Microsoft specific board id.
+
+What: /sys/devices/platform/146bfa94.xbl/hw_init_retries
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns a Microsoft specific value related to the
+ retries attempted to properly initialize the battery charging
+ subsystem.
+
+What: /sys/devices/platform/146bfa94.xbl/is_act_mode
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns whether ACT mode is enabled. Valid values
+ are:
+ 0 - ACT disabled
+ 1 - ACT enabled
+
+ ACT mode is used to run checks and put the device to shipmode
+ at factory.
+
+What: /sys/devices/platform/146bfa94.xbl/is_customer_mode
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+
+ mode. Valid values are:
+ 0 - Not in manufacturing mode
+ 1 - In manufacturing mode
+
+What: /sys/devices/platform/146bfa94.xbl/ocp_error_location
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns 0 or the id of the power rail which has the
+ OCP error. Valid values are:
+ Bit(s) Meaning
+ 15 More than one OCP error occurred
+ 14-12 PMIC
+ 11-7 SMPS
+ 6-2 LDO
+ 1-0 BOB
+
+What: /sys/devices/platform/146bfa94.xbl/pmic_reset_reason
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns the reason for the reset. Valid values
+ are:
+ 0 - no reason lol
+ 9 - Battery driver triggered
+
+What: /sys/devices/platform/146bfa94.xbl/touch_fw_version
+Date: October 2021
+KernelVersion: 5.16
+Contact: [email protected]
+Description:
+ Read only. It returns the version of the firmware.
diff --git a/MAINTAINERS b/MAINTAINERS
index 0daa416a2aba..4f04f7afa3e1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12655,7 +12655,9 @@ M: Jarrett Schultz <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
+F: Documentation/ABI/testing/sysfs-platform-surface-xbl
F: Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
+F: drivers/platform/surface/surface-xbl.c

MICROSOFT SURFACE GPE LID SUPPORT DRIVER
M: Maximilian Luz <[email protected]>
diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig
index 5f0578e25f71..96d6030d8d49 100644
--- a/drivers/platform/surface/Kconfig
+++ b/drivers/platform/surface/Kconfig
@@ -185,6 +185,18 @@ config SURFACE_PRO3_BUTTON
help
This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.

+config SURFACE_XBL
+ tristate "Surface XBL Driver"
+ depends on ARM64 || COMPILE_TEST
+ depends on OF
+ help
+ If you say 'Y' to this option, support will be included for the
+ Surface Extensible Boot Loader (XBL) Driver. This driver exposes
+ information about the device through sysfs.
+
+ This driver can also be built as a module. If so, the module
+ will be called surface-xbl.
+
source "drivers/platform/surface/aggregator/Kconfig"

endif # SURFACE_PLATFORMS
diff --git a/drivers/platform/surface/Makefile b/drivers/platform/surface/Makefile
index 32889482de55..eef05d247f75 100644
--- a/drivers/platform/surface/Makefile
+++ b/drivers/platform/surface/Makefile
@@ -16,3 +16,4 @@ obj-$(CONFIG_SURFACE_GPE) += surface_gpe.o
obj-$(CONFIG_SURFACE_HOTPLUG) += surface_hotplug.o
obj-$(CONFIG_SURFACE_PLATFORM_PROFILE) += surface_platform_profile.o
obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o
+obj-$(CONFIG_SURFACE_XBL) += surface_xbl.o
diff --git a/drivers/platform/surface/surface_xbl.c b/drivers/platform/surface/surface_xbl.c
new file mode 100644
index 000000000000..e6272b704526
--- /dev/null
+++ b/drivers/platform/surface/surface_xbl.c
@@ -0,0 +1,186 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Surface eXtensible Boot Loader (XBL)
+ *
+ * Copyright (C) 2021 Microsoft Corporation
+ * Author: Jarrett Schultz <[email protected]>
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/types.h>
+
+#define SURFACE_XBL_MAX_VERSION_LEN 16
+#define SURFACE_XBL_BOARD_ID 0
+#define SURFACE_XBL_BATTERY_PRESENT 1
+#define SURFACE_XBL_HW_INIT_RETRIES 2
+#define SURFACE_XBL_IS_CUSTOMER_MODE 3
+#define SURFACE_XBL_IS_ACT_MODE 4
+#define SURFACE_XBL_PMIC_RESET_REASON 5
+#define SURFACE_XBL_TOUCH_FW_VERSION 6
+#define SURFACE_XBL_OCP_ERROR_LOCATION \
+ (SURFACE_XBL_TOUCH_FW_VERSION + \
+ SURFACE_XBL_MAX_VERSION_LEN)
+
+struct surface_xbl {
+ struct device *dev;
+
+ u8 board_id;
+ u8 battery_present;
+ u8 hw_init_retries;
+ u8 is_customer_mode;
+ u8 is_act_mode;
+ u8 pmic_reset_reason;
+ char touch_fw_version[SURFACE_XBL_MAX_VERSION_LEN];
+ u16 ocp_error_location;
+};
+
+static ssize_t
+board_id_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->board_id);
+}
+static DEVICE_ATTR_RO(board_id);
+
+static ssize_t
+battery_present_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->battery_present);
+}
+static DEVICE_ATTR_RO(battery_present);
+
+static ssize_t
+hw_init_retries_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->hw_init_retries);
+}
+static DEVICE_ATTR_RO(hw_init_retries);
+
+static ssize_t
+is_customer_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->is_customer_mode);
+}
+static DEVICE_ATTR_RO(is_customer_mode);
+
+static ssize_t
+is_act_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->is_act_mode);
+}
+static DEVICE_ATTR_RO(is_act_mode);
+
+static ssize_t
+pmic_reset_reason_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->pmic_reset_reason);
+}
+static DEVICE_ATTR_RO(pmic_reset_reason);
+
+static ssize_t
+touch_fw_version_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "0x%s\n", sxbl->touch_fw_version);
+}
+static DEVICE_ATTR_RO(touch_fw_version);
+
+static ssize_t
+ocp_error_location_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct surface_xbl *sxbl = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%d\n", sxbl->ocp_error_location);
+}
+static DEVICE_ATTR_RO(ocp_error_location);
+
+static struct attribute *xbl_attrs[] = {
+ &dev_attr_board_id.attr,
+ &dev_attr_battery_present.attr,
+ &dev_attr_hw_init_retries.attr,
+ &dev_attr_is_customer_mode.attr,
+ &dev_attr_is_act_mode.attr,
+ &dev_attr_pmic_reset_reason.attr,
+ &dev_attr_touch_fw_version.attr,
+ &dev_attr_ocp_error_location.attr,
+ NULL
+};
+
+static const struct attribute_group xbl_attr_group = {
+ .attrs = xbl_attrs,
+};
+
+const struct attribute_group *xbl_sysfs_groups[] = {
+ &xbl_attr_group,
+ NULL
+};
+
+static int surface_xbl_probe(struct platform_device *pdev)
+{
+ struct surface_xbl *sxbl;
+ void __iomem *regs;
+ int i;
+
+ sxbl = devm_kzalloc(&pdev->dev, sizeof(*sxbl), GFP_KERNEL);
+ if (!sxbl)
+ return -ENOMEM;
+
+ sxbl->dev = &pdev->dev;
+
+ regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(regs))
+ return PTR_ERR(regs);
+
+ platform_set_drvdata(pdev, sxbl);
+
+ sxbl->board_id = readb(regs + SURFACE_XBL_BOARD_ID);
+ sxbl->battery_present = readb(regs + SURFACE_XBL_BATTERY_PRESENT);
+ sxbl->hw_init_retries = readb(regs + SURFACE_XBL_HW_INIT_RETRIES);
+ sxbl->is_customer_mode = readb(regs + SURFACE_XBL_IS_CUSTOMER_MODE);
+ sxbl->is_act_mode = readb(regs + SURFACE_XBL_IS_ACT_MODE);
+ sxbl->pmic_reset_reason = readb(regs + SURFACE_XBL_PMIC_RESET_REASON);
+
+ for (i = 0; i < SURFACE_XBL_MAX_VERSION_LEN; i++)
+ sxbl->touch_fw_version[i] = readb(regs + SURFACE_XBL_TOUCH_FW_VERSION + i);
+
+ sxbl->ocp_error_location = readb(regs + SURFACE_XBL_OCP_ERROR_LOCATION);
+
+ return 0;
+}
+
+static const struct of_device_id surface_xbl_of_match[] = {
+ {
+ .compatible = "microsoft,sm8150-surface-duo-xbl"
+ },
+ { }
+};
+MODULE_DEVICE_TABLE(of, surface_xbl_of_match);
+
+static struct platform_driver surface_xbl_driver = {
+ .driver = {
+ .name = "surface-xbl",
+ .of_match_table = surface_xbl_of_match,
+ .dev_groups = xbl_sysfs_groups
+ },
+ .probe = surface_xbl_probe,
+};
+module_platform_driver(surface_xbl_driver);
+
+MODULE_AUTHOR("Jarrett Schultz <[email protected]>");
+MODULE_DESCRIPTION("Surface Extensible Bootloader");
+MODULE_LICENSE("GPL");
--
2.25.1


2021-12-02 19:17:08

by Jarrett Schultz

[permalink] [raw]
Subject: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Since the Surface XBL Driver does not depend on ACPI, the
platform/surface directory as a whole no longer depends on ACPI. With
respect to this, the ACPI dependency is moved into each config that depends
on ACPI individually.

Signed-off-by: Jarrett Schultz <[email protected]>

---

Changes in v3:
- Further propagated ACPI dependecy to SURFACE_AGGREGATOR

---

Changes in v2:
- Created to propagate ACPI dependency
---
drivers/platform/surface/Kconfig | 7 ++++++-
drivers/platform/surface/aggregator/Kconfig | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig
index 3105f651614f..5f0578e25f71 100644
--- a/drivers/platform/surface/Kconfig
+++ b/drivers/platform/surface/Kconfig
@@ -5,7 +5,6 @@

menuconfig SURFACE_PLATFORMS
bool "Microsoft Surface Platform-Specific Device Drivers"
- depends on ACPI
default y
help
Say Y here to get to see options for platform-specific device drivers
@@ -30,12 +29,14 @@ config SURFACE3_WMI

config SURFACE_3_BUTTON
tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet"
+ depends on ACPI
depends on KEYBOARD_GPIO && I2C
help
This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet.

config SURFACE_3_POWER_OPREGION
tristate "Surface 3 battery platform operation region support"
+ depends on ACPI
depends on I2C
help
This driver provides support for ACPI operation
@@ -126,6 +127,7 @@ config SURFACE_DTX

config SURFACE_GPE
tristate "Surface GPE/Lid Support Driver"
+ depends on ACPI
depends on DMI
help
This driver marks the GPEs related to the ACPI lid device found on
@@ -135,6 +137,7 @@ config SURFACE_GPE

config SURFACE_HOTPLUG
tristate "Surface Hot-Plug Driver"
+ depends on ACPI
depends on GPIOLIB
help
Driver for out-of-band hot-plug event signaling on Microsoft Surface
@@ -154,6 +157,7 @@ config SURFACE_HOTPLUG

config SURFACE_PLATFORM_PROFILE
tristate "Surface Platform Profile Driver"
+ depends on ACPI
depends on SURFACE_AGGREGATOR_REGISTRY
select ACPI_PLATFORM_PROFILE
help
@@ -176,6 +180,7 @@ config SURFACE_PLATFORM_PROFILE

config SURFACE_PRO3_BUTTON
tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
+ depends on ACPI
depends on INPUT
help
This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
diff --git a/drivers/platform/surface/aggregator/Kconfig b/drivers/platform/surface/aggregator/Kconfig
index fd6dc452f3e8..cab020324256 100644
--- a/drivers/platform/surface/aggregator/Kconfig
+++ b/drivers/platform/surface/aggregator/Kconfig
@@ -4,6 +4,7 @@
menuconfig SURFACE_AGGREGATOR
tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
depends on SERIAL_DEV_BUS
+ depends on ACPI
select CRC_CCITT
help
The Surface System Aggregator Module (Surface SAM or SSAM) is an
--
2.25.1


2021-12-02 20:05:18

by Trilok Soni

[permalink] [raw]
Subject: Re: [PATCH 1/5] dt-bindings: platform: microsoft: Document surface xbl

On 12/2/2021 11:16 AM, Jarrett Schultz wrote:
> Introduce yaml for surface xbl driver.
>
> Signed-off-by: Jarrett Schultz <[email protected]>
>
>

Is it not possible to send patch email from @microsoft.com ?

---Trilok Soni

2021-12-03 09:59:19

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi Jarett,

On 12/2/21 20:16, Jarrett Schultz wrote:
> Since the Surface XBL Driver does not depend on ACPI, the
> platform/surface directory as a whole no longer depends on ACPI. With
> respect to this, the ACPI dependency is moved into each config that depends
> on ACPI individually.
>
> Signed-off-by: Jarrett Schultz <[email protected]>

I think I will already merge this patch into the pdx86 tree:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/

While we are waiting for the rest of the series to get hashed out.

But as already pointed out by Trilok Soni your From: and Signed-off-by
email addresses don't match.

I can fix up the From to match the Signed-off-by while I apply this,
but before I do that I wanted to check with you that setting both
to "Jarrett Schultz <[email protected]>" is the right thing to do ?

Regards,

Hans






>
> ---
>
> Changes in v3:
> - Further propagated ACPI dependecy to SURFACE_AGGREGATOR
>
> ---
>
> Changes in v2:
> - Created to propagate ACPI dependency
> ---
> drivers/platform/surface/Kconfig | 7 ++++++-
> drivers/platform/surface/aggregator/Kconfig | 1 +
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig
> index 3105f651614f..5f0578e25f71 100644
> --- a/drivers/platform/surface/Kconfig
> +++ b/drivers/platform/surface/Kconfig
> @@ -5,7 +5,6 @@
>
> menuconfig SURFACE_PLATFORMS
> bool "Microsoft Surface Platform-Specific Device Drivers"
> - depends on ACPI
> default y
> help
> Say Y here to get to see options for platform-specific device drivers
> @@ -30,12 +29,14 @@ config SURFACE3_WMI
>
> config SURFACE_3_BUTTON
> tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet"
> + depends on ACPI
> depends on KEYBOARD_GPIO && I2C
> help
> This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet.
>
> config SURFACE_3_POWER_OPREGION
> tristate "Surface 3 battery platform operation region support"
> + depends on ACPI
> depends on I2C
> help
> This driver provides support for ACPI operation
> @@ -126,6 +127,7 @@ config SURFACE_DTX
>
> config SURFACE_GPE
> tristate "Surface GPE/Lid Support Driver"
> + depends on ACPI
> depends on DMI
> help
> This driver marks the GPEs related to the ACPI lid device found on
> @@ -135,6 +137,7 @@ config SURFACE_GPE
>
> config SURFACE_HOTPLUG
> tristate "Surface Hot-Plug Driver"
> + depends on ACPI
> depends on GPIOLIB
> help
> Driver for out-of-band hot-plug event signaling on Microsoft Surface
> @@ -154,6 +157,7 @@ config SURFACE_HOTPLUG
>
> config SURFACE_PLATFORM_PROFILE
> tristate "Surface Platform Profile Driver"
> + depends on ACPI
> depends on SURFACE_AGGREGATOR_REGISTRY
> select ACPI_PLATFORM_PROFILE
> help
> @@ -176,6 +180,7 @@ config SURFACE_PLATFORM_PROFILE
>
> config SURFACE_PRO3_BUTTON
> tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
> + depends on ACPI
> depends on INPUT
> help
> This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
> diff --git a/drivers/platform/surface/aggregator/Kconfig b/drivers/platform/surface/aggregator/Kconfig
> index fd6dc452f3e8..cab020324256 100644
> --- a/drivers/platform/surface/aggregator/Kconfig
> +++ b/drivers/platform/surface/aggregator/Kconfig
> @@ -4,6 +4,7 @@
> menuconfig SURFACE_AGGREGATOR
> tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
> depends on SERIAL_DEV_BUS
> + depends on ACPI
> select CRC_CCITT
> help
> The Surface System Aggregator Module (Surface SAM or SSAM) is an
>


2021-12-03 17:34:16

by Jarrett Schultz

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency



> -----Original Message-----
> From: Hans de Goede <[email protected]>
> Sent: Friday, December 3, 2021 1:59 AM
> To: Jarrett Schultz <[email protected]>; Rob Herring
> <[email protected]>; Andy Gross <[email protected]>; Bjorn Andersson
> <[email protected]>; Mark Gross <[email protected]>;
> Maximilian Luz <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; Felipe Balbi
> <[email protected]>; Jarrett Schultz <[email protected]>
> Subject: [EXTERNAL] Re: [PATCH 2/5] platform: surface: Propagate ACPI
> Dependency
>
> Hi Jarett,
>
> On 12/2/21 20:16, Jarrett Schultz wrote:
> > Since the Surface XBL Driver does not depend on ACPI, the
> > platform/surface directory as a whole no longer depends on ACPI. With
> > respect to this, the ACPI dependency is moved into each config that
> > depends on ACPI individually.
> >
> > Signed-off-by: Jarrett Schultz <[email protected]>
>
> I think I will already merge this patch into the pdx86 tree:
>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.k
> ernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fpdx86%2Fplatform-
> drivers-
> x86.git%2F&amp;data=04%7C01%7Cjaschultz%40microsoft.com%7C0ab6fcc6
> 4a5c4fd8657308d9b64391dd%7C72f988bf86f141af91ab2d7cd011db47%7C0
> %7C0%7C637741223627024908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&
> amp;sdata=fEszuAgBLL3g2Z9Lh3DPQ%2BlzrWZR3o6aUst6fDmLOrE%3D&amp
> ;reserved=0
>
> While we are waiting for the rest of the series to get hashed out.
>
> But as already pointed out by Trilok Soni your From: and Signed-off-by email
> addresses don't match.
>
> I can fix up the From to match the Signed-off-by while I apply this, but before
> I do that I wanted to check with you that setting both to "Jarrett Schultz
> <[email protected]>" is the right thing to do ?
>
> Regards,
>
> Hans
>
>

Hans,

Yes, that is the correct email. Still trying to get all the kinks worked out, I appreciate your patience.

Thank you,
Jarrett

>
>
>
>
> >
> > ---
> >
> > Changes in v3:
> > - Further propagated ACPI dependecy to SURFACE_AGGREGATOR
> >
> > ---
> >
> > Changes in v2:
> > - Created to propagate ACPI dependency
> > ---
> > drivers/platform/surface/Kconfig | 7 ++++++-
> > drivers/platform/surface/aggregator/Kconfig | 1 +
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/surface/Kconfig
> > b/drivers/platform/surface/Kconfig
> > index 3105f651614f..5f0578e25f71 100644
> > --- a/drivers/platform/surface/Kconfig
> > +++ b/drivers/platform/surface/Kconfig
> > @@ -5,7 +5,6 @@
> >
> > menuconfig SURFACE_PLATFORMS
> > bool "Microsoft Surface Platform-Specific Device Drivers"
> > - depends on ACPI
> > default y
> > help
> > Say Y here to get to see options for platform-specific device
> > drivers @@ -30,12 +29,14 @@ config SURFACE3_WMI
> >
> > config SURFACE_3_BUTTON
> > tristate "Power/home/volume buttons driver for Microsoft Surface 3
> tablet"
> > + depends on ACPI
> > depends on KEYBOARD_GPIO && I2C
> > help
> > This driver handles the power/home/volume buttons on the
> Microsoft Surface 3 tablet.
> >
> > config SURFACE_3_POWER_OPREGION
> > tristate "Surface 3 battery platform operation region support"
> > + depends on ACPI
> > depends on I2C
> > help
> > This driver provides support for ACPI operation @@ -126,6 +127,7
> > @@ config SURFACE_DTX
> >
> > config SURFACE_GPE
> > tristate "Surface GPE/Lid Support Driver"
> > + depends on ACPI
> > depends on DMI
> > help
> > This driver marks the GPEs related to the ACPI lid device found on
> > @@ -135,6 +137,7 @@ config SURFACE_GPE
> >
> > config SURFACE_HOTPLUG
> > tristate "Surface Hot-Plug Driver"
> > + depends on ACPI
> > depends on GPIOLIB
> > help
> > Driver for out-of-band hot-plug event signaling on Microsoft
> > Surface @@ -154,6 +157,7 @@ config SURFACE_HOTPLUG
> >
> > config SURFACE_PLATFORM_PROFILE
> > tristate "Surface Platform Profile Driver"
> > + depends on ACPI
> > depends on SURFACE_AGGREGATOR_REGISTRY
> > select ACPI_PLATFORM_PROFILE
> > help
> > @@ -176,6 +180,7 @@ config SURFACE_PLATFORM_PROFILE
> >
> > config SURFACE_PRO3_BUTTON
> > tristate "Power/home/volume buttons driver for Microsoft Surface
> Pro 3/4 tablet"
> > + depends on ACPI
> > depends on INPUT
> > help
> > This driver handles the power/home/volume buttons on the
> Microsoft Surface Pro 3/4 tablet.
> > diff --git a/drivers/platform/surface/aggregator/Kconfig
> > b/drivers/platform/surface/aggregator/Kconfig
> > index fd6dc452f3e8..cab020324256 100644
> > --- a/drivers/platform/surface/aggregator/Kconfig
> > +++ b/drivers/platform/surface/aggregator/Kconfig
> > @@ -4,6 +4,7 @@
> > menuconfig SURFACE_AGGREGATOR
> > tristate "Microsoft Surface System Aggregator Module Subsystem
> and Drivers"
> > depends on SERIAL_DEV_BUS
> > + depends on ACPI
> > select CRC_CCITT
> > help
> > The Surface System Aggregator Module (Surface SAM or SSAM) is an
> >


2021-12-03 23:34:20

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/5] dt-bindings: platform: microsoft: Document surface xbl

On Thu, 02 Dec 2021 11:16:26 -0800, Jarrett Schultz wrote:
> Introduce yaml for surface xbl driver.
>
> Signed-off-by: Jarrett Schultz <[email protected]>
>
> ---
>
> Changes in v3:
> - Updated description to only pertain to the hardware
> - Updated the required field to properly reflect the binding
> - Removed the first example
> - Fixed the size of the reg field in the second example
>
> ---
>
> Changes in v2:
> - Removed json-schema dependence
> - Elaborated on description of driver
> - Updated example
> ---
> .../platform/microsoft/surface-xbl.yaml | 69 +++++++++++++++++++
> MAINTAINERS | 7 ++
> 2 files changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml: properties:properties: 'compatible' is not one of ['$ref', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'default', 'dependencies', 'dependentRequired', 'dependentSchemas', 'deprecated', 'description', 'else', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'items', 'if', 'minItems', 'minimum', 'maxItems', 'maximum', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'required', 'then', 'type', 'typeSize', 'unevaluatedProperties', 'uniqueItems']
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml: properties: 'properties' should not be valid under {'enum': ['$ref', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'default', 'dependencies', 'dependentRequired', 'dependentSchemas', 'deprecated', 'description', 'else', 'enum', 'if', 'items', 'maxItems', 'maximum', 'minItems', 'minimum', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'propertyNames', 'required', 'then', 'unevaluatedProperties']}
hint: A json-schema keyword was found instead of a DT property name.
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml: ignoring, error in schema: properties: properties
warning: no schema found in file: ./Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml
Documentation/devicetree/bindings/platform/microsoft/surface-xbl.example.dt.yaml:0:0: /example-0/imem@146bf000/xbl@a94: failed to match any schema with compatible: ['microsoft,sm8150-surface-duo-xbl']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1562961

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


2021-12-06 21:40:49

by Hans de Goede

[permalink] [raw]
Subject: Re: [EXTERNAL] Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi,

On 12/3/21 18:34, Jarrett Schultz wrote:
>
>
>> -----Original Message-----
>> From: Hans de Goede <[email protected]>
>> Sent: Friday, December 3, 2021 1:59 AM
>> To: Jarrett Schultz <[email protected]>; Rob Herring
>> <[email protected]>; Andy Gross <[email protected]>; Bjorn Andersson
>> <[email protected]>; Mark Gross <[email protected]>;
>> Maximilian Luz <[email protected]>
>> Cc: [email protected]; [email protected];
>> [email protected]; [email protected]; Felipe Balbi
>> <[email protected]>; Jarrett Schultz <[email protected]>
>> Subject: [EXTERNAL] Re: [PATCH 2/5] platform: surface: Propagate ACPI
>> Dependency
>>
>> Hi Jarett,
>>
>> On 12/2/21 20:16, Jarrett Schultz wrote:
>>> Since the Surface XBL Driver does not depend on ACPI, the
>>> platform/surface directory as a whole no longer depends on ACPI. With
>>> respect to this, the ACPI dependency is moved into each config that
>>> depends on ACPI individually.
>>>
>>> Signed-off-by: Jarrett Schultz <[email protected]>
>>
>> I think I will already merge this patch into the pdx86 tree:
>>
>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.k
>> ernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fpdx86%2Fplatform-
>> drivers-
>> x86.git%2F&amp;data=04%7C01%7Cjaschultz%40microsoft.com%7C0ab6fcc6
>> 4a5c4fd8657308d9b64391dd%7C72f988bf86f141af91ab2d7cd011db47%7C0
>> %7C0%7C637741223627024908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
>> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&
>> amp;sdata=fEszuAgBLL3g2Z9Lh3DPQ%2BlzrWZR3o6aUst6fDmLOrE%3D&amp
>> ;reserved=0
>>
>> While we are waiting for the rest of the series to get hashed out.
>>
>> But as already pointed out by Trilok Soni your From: and Signed-off-by email
>> addresses don't match.
>>
>> I can fix up the From to match the Signed-off-by while I apply this, but before
>> I do that I wanted to check with you that setting both to "Jarrett Schultz
>> <[email protected]>" is the right thing to do ?
>>
>> Regards,
>>
>> Hans
>>
>>
>
> Hans,
>
> Yes, that is the correct email. Still trying to get all the kinks worked out, I appreciate your patience.

Ok, I've merged this patch now, so you can drop it from the next version of
the series.


Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans





>>> ---
>>>
>>> Changes in v3:
>>> - Further propagated ACPI dependecy to SURFACE_AGGREGATOR
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - Created to propagate ACPI dependency
>>> ---
>>> drivers/platform/surface/Kconfig | 7 ++++++-
>>> drivers/platform/surface/aggregator/Kconfig | 1 +
>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/platform/surface/Kconfig
>>> b/drivers/platform/surface/Kconfig
>>> index 3105f651614f..5f0578e25f71 100644
>>> --- a/drivers/platform/surface/Kconfig
>>> +++ b/drivers/platform/surface/Kconfig
>>> @@ -5,7 +5,6 @@
>>>
>>> menuconfig SURFACE_PLATFORMS
>>> bool "Microsoft Surface Platform-Specific Device Drivers"
>>> - depends on ACPI
>>> default y
>>> help
>>> Say Y here to get to see options for platform-specific device
>>> drivers @@ -30,12 +29,14 @@ config SURFACE3_WMI
>>>
>>> config SURFACE_3_BUTTON
>>> tristate "Power/home/volume buttons driver for Microsoft Surface 3
>> tablet"
>>> + depends on ACPI
>>> depends on KEYBOARD_GPIO && I2C
>>> help
>>> This driver handles the power/home/volume buttons on the
>> Microsoft Surface 3 tablet.
>>>
>>> config SURFACE_3_POWER_OPREGION
>>> tristate "Surface 3 battery platform operation region support"
>>> + depends on ACPI
>>> depends on I2C
>>> help
>>> This driver provides support for ACPI operation @@ -126,6 +127,7
>>> @@ config SURFACE_DTX
>>>
>>> config SURFACE_GPE
>>> tristate "Surface GPE/Lid Support Driver"
>>> + depends on ACPI
>>> depends on DMI
>>> help
>>> This driver marks the GPEs related to the ACPI lid device found on
>>> @@ -135,6 +137,7 @@ config SURFACE_GPE
>>>
>>> config SURFACE_HOTPLUG
>>> tristate "Surface Hot-Plug Driver"
>>> + depends on ACPI
>>> depends on GPIOLIB
>>> help
>>> Driver for out-of-band hot-plug event signaling on Microsoft
>>> Surface @@ -154,6 +157,7 @@ config SURFACE_HOTPLUG
>>>
>>> config SURFACE_PLATFORM_PROFILE
>>> tristate "Surface Platform Profile Driver"
>>> + depends on ACPI
>>> depends on SURFACE_AGGREGATOR_REGISTRY
>>> select ACPI_PLATFORM_PROFILE
>>> help
>>> @@ -176,6 +180,7 @@ config SURFACE_PLATFORM_PROFILE
>>>
>>> config SURFACE_PRO3_BUTTON
>>> tristate "Power/home/volume buttons driver for Microsoft Surface
>> Pro 3/4 tablet"
>>> + depends on ACPI
>>> depends on INPUT
>>> help
>>> This driver handles the power/home/volume buttons on the
>> Microsoft Surface Pro 3/4 tablet.
>>> diff --git a/drivers/platform/surface/aggregator/Kconfig
>>> b/drivers/platform/surface/aggregator/Kconfig
>>> index fd6dc452f3e8..cab020324256 100644
>>> --- a/drivers/platform/surface/aggregator/Kconfig
>>> +++ b/drivers/platform/surface/aggregator/Kconfig
>>> @@ -4,6 +4,7 @@
>>> menuconfig SURFACE_AGGREGATOR
>>> tristate "Microsoft Surface System Aggregator Module Subsystem
>> and Drivers"
>>> depends on SERIAL_DEV_BUS
>>> + depends on ACPI
>>> select CRC_CCITT
>>> help
>>> The Surface System Aggregator Module (Surface SAM or SSAM) is an
>>>
>


2022-01-12 07:39:44

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi Jarrett,

On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz <[email protected]> wrote:
> Since the Surface XBL Driver does not depend on ACPI, the
> platform/surface directory as a whole no longer depends on ACPI. With
> respect to this, the ACPI dependency is moved into each config that depends
> on ACPI individually.
>
> Signed-off-by: Jarrett Schultz <[email protected]>

Thanks for your patch, which is now commit 272479928172edf0 ("platform:
surface: Propagate ACPI Dependency").

> --- a/drivers/platform/surface/Kconfig
> +++ b/drivers/platform/surface/Kconfig
> @@ -5,7 +5,6 @@
>
> menuconfig SURFACE_PLATFORMS
> bool "Microsoft Surface Platform-Specific Device Drivers"
> - depends on ACPI
> default y
> help
> Say Y here to get to see options for platform-specific device drivers

Without any dependency, all users configuring a kernel are now asked
about this. Is there any other platform dependency that can be used
instead?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2022-01-14 06:21:51

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency


Hi,

Geert Uytterhoeven <[email protected]> writes:
> Hi Jarrett,
>
> On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz <[email protected]> wrote:
>> Since the Surface XBL Driver does not depend on ACPI, the
>> platform/surface directory as a whole no longer depends on ACPI. With
>> respect to this, the ACPI dependency is moved into each config that depends
>> on ACPI individually.
>>
>> Signed-off-by: Jarrett Schultz <[email protected]>
>
> Thanks for your patch, which is now commit 272479928172edf0 ("platform:
> surface: Propagate ACPI Dependency").
>
>> --- a/drivers/platform/surface/Kconfig
>> +++ b/drivers/platform/surface/Kconfig
>> @@ -5,7 +5,6 @@
>>
>> menuconfig SURFACE_PLATFORMS
>> bool "Microsoft Surface Platform-Specific Device Drivers"
>> - depends on ACPI
>> default y
>> help
>> Say Y here to get to see options for platform-specific device drivers
>
> Without any dependency, all users configuring a kernel are now asked
> about this. Is there any other platform dependency that can be used
> instead?

there's probably no symbol that would be true for x86 and arm64 while
being false for everything else. Any ideas?

In any case, what's the problem of being asked about a new symbol? That
happens all the time whenever new drivers are merged, right?

--
balbi

2022-01-14 08:30:46

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi Felipe,

On Fri, Jan 14, 2022 at 7:21 AM Felipe Balbi <[email protected]> wrote:
> Geert Uytterhoeven <[email protected]> writes:
> > On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz <[email protected]> wrote:
> >> Since the Surface XBL Driver does not depend on ACPI, the
> >> platform/surface directory as a whole no longer depends on ACPI. With
> >> respect to this, the ACPI dependency is moved into each config that depends
> >> on ACPI individually.
> >>
> >> Signed-off-by: Jarrett Schultz <[email protected]>
> >
> > Thanks for your patch, which is now commit 272479928172edf0 ("platform:
> > surface: Propagate ACPI Dependency").
> >
> >> --- a/drivers/platform/surface/Kconfig
> >> +++ b/drivers/platform/surface/Kconfig
> >> @@ -5,7 +5,6 @@
> >>
> >> menuconfig SURFACE_PLATFORMS
> >> bool "Microsoft Surface Platform-Specific Device Drivers"
> >> - depends on ACPI
> >> default y
> >> help
> >> Say Y here to get to see options for platform-specific device drivers
> >
> > Without any dependency, all users configuring a kernel are now asked
> > about this. Is there any other platform dependency that can be used
> > instead?
>
> there's probably no symbol that would be true for x86 and arm64 while
> being false for everything else. Any ideas?

depends on ARM64 || X86 || COMPILE_TEST?

> In any case, what's the problem of being asked about a new symbol? That
> happens all the time whenever new drivers are merged, right?

In se there is no problem with being asked about a new symbol.
The problem is the sheer number of symbols, and irrelevant questions
(e.g. this one, on !x86 and !arm64).
Time spent on adding proper dependencies is IMHO well-spent, as it
will save time for everyone who configures his own kernel.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2022-01-14 08:32:04

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi,

On 1/14/22 09:29, Geert Uytterhoeven wrote:
> Hi Felipe,
>
> On Fri, Jan 14, 2022 at 7:21 AM Felipe Balbi <[email protected]> wrote:
>> Geert Uytterhoeven <[email protected]> writes:
>>> On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz <[email protected]> wrote:
>>>> Since the Surface XBL Driver does not depend on ACPI, the
>>>> platform/surface directory as a whole no longer depends on ACPI. With
>>>> respect to this, the ACPI dependency is moved into each config that depends
>>>> on ACPI individually.
>>>>
>>>> Signed-off-by: Jarrett Schultz <[email protected]>
>>>
>>> Thanks for your patch, which is now commit 272479928172edf0 ("platform:
>>> surface: Propagate ACPI Dependency").
>>>
>>>> --- a/drivers/platform/surface/Kconfig
>>>> +++ b/drivers/platform/surface/Kconfig
>>>> @@ -5,7 +5,6 @@
>>>>
>>>> menuconfig SURFACE_PLATFORMS
>>>> bool "Microsoft Surface Platform-Specific Device Drivers"
>>>> - depends on ACPI
>>>> default y
>>>> help
>>>> Say Y here to get to see options for platform-specific device drivers
>>>
>>> Without any dependency, all users configuring a kernel are now asked
>>> about this. Is there any other platform dependency that can be used
>>> instead?
>>
>> there's probably no symbol that would be true for x86 and arm64 while
>> being false for everything else. Any ideas?
>
> depends on ARM64 || X86 || COMPILE_TEST?

That sounds reasonable to me, I would be happy to take a patch for that.

Regards,

Hans



2022-01-14 08:38:22

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency


Hi,

Hans de Goede <[email protected]> writes:
> Hi,
>
> On 1/14/22 09:29, Geert Uytterhoeven wrote:
>> Hi Felipe,
>>
>> On Fri, Jan 14, 2022 at 7:21 AM Felipe Balbi <[email protected]> wrote:
>>> Geert Uytterhoeven <[email protected]> writes:
>>>> On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz <[email protected]> wrote:
>>>>> Since the Surface XBL Driver does not depend on ACPI, the
>>>>> platform/surface directory as a whole no longer depends on ACPI. With
>>>>> respect to this, the ACPI dependency is moved into each config that depends
>>>>> on ACPI individually.
>>>>>
>>>>> Signed-off-by: Jarrett Schultz <[email protected]>
>>>>
>>>> Thanks for your patch, which is now commit 272479928172edf0 ("platform:
>>>> surface: Propagate ACPI Dependency").
>>>>
>>>>> --- a/drivers/platform/surface/Kconfig
>>>>> +++ b/drivers/platform/surface/Kconfig
>>>>> @@ -5,7 +5,6 @@
>>>>>
>>>>> menuconfig SURFACE_PLATFORMS
>>>>> bool "Microsoft Surface Platform-Specific Device Drivers"
>>>>> - depends on ACPI
>>>>> default y
>>>>> help
>>>>> Say Y here to get to see options for platform-specific device drivers
>>>>
>>>> Without any dependency, all users configuring a kernel are now asked
>>>> about this. Is there any other platform dependency that can be used
>>>> instead?
>>>
>>> there's probably no symbol that would be true for x86 and arm64 while
>>> being false for everything else. Any ideas?
>>
>> depends on ARM64 || X86 || COMPILE_TEST?
>
> That sounds reasonable to me, I would be happy to take a patch for that.

fair enough, let's see what Jarrett replies

--
balbi

2022-01-14 22:58:34

by Jarrett Schultz

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH 2/5] platform: surface: Propagate ACPI Dependency

Hi,

> Felipe Balbi <[email protected]> writes:
>
> Hi,
>
> Hans de Goede <[email protected]> writes:
> > Hi,
> >
> > On 1/14/22 09:29, Geert Uytterhoeven wrote:
> >> Hi Felipe,
> >>
> >> On Fri, Jan 14, 2022 at 7:21 AM Felipe Balbi <[email protected]> wrote:
> >>> Geert Uytterhoeven <[email protected]> writes:
> >>>> On Mon, Dec 6, 2021 at 4:03 PM Jarrett Schultz
> <[email protected]> wrote:
> >>>>> Since the Surface XBL Driver does not depend on ACPI, the
> >>>>> platform/surface directory as a whole no longer depends on ACPI.
> >>>>> With respect to this, the ACPI dependency is moved into each
> >>>>> config that depends on ACPI individually.
> >>>>>
> >>>>> Signed-off-by: Jarrett Schultz <[email protected]>
> >>>>
> >>>> Thanks for your patch, which is now commit 272479928172edf0
> ("platform:
> >>>> surface: Propagate ACPI Dependency").
> >>>>
> >>>>> --- a/drivers/platform/surface/Kconfig
> >>>>> +++ b/drivers/platform/surface/Kconfig
> >>>>> @@ -5,7 +5,6 @@
> >>>>>
> >>>>> menuconfig SURFACE_PLATFORMS
> >>>>> bool "Microsoft Surface Platform-Specific Device Drivers"
> >>>>> - depends on ACPI
> >>>>> default y
> >>>>> help
> >>>>> Say Y here to get to see options for platform-specific
> >>>>> device drivers
> >>>>
> >>>> Without any dependency, all users configuring a kernel are now
> >>>> asked about this. Is there any other platform dependency that can
> >>>> be used instead?
> >>>
> >>> there's probably no symbol that would be true for x86 and arm64
> >>> while being false for everything else. Any ideas?
> >>
> >> depends on ARM64 || X86 || COMPILE_TEST?
> >
> > That sounds reasonable to me, I would be happy to take a patch for that.
>
> fair enough, let's see what Jarrett replies
>
> --
> Balbi

Sounds good to me, I'll include this in the next patch version. Thank you for pointing this out.

-Jarrett