Skip to content

Commit

Permalink
Merge tag 'platform-drivers-x86-ib-lenovo-c630-v6.11-2'
Browse files Browse the repository at this point in the history
Immutable branch between pdx86 lenovo c630 branch, power/supply and USB
subsystems due for the v6.11 merge window, which is required for the
Lenovo C630 battery driver.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
  • Loading branch information
sre committed Jun 26, 2024
2 parents f8b6c1e + 13bbe1c commit 427eb78
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/platform/lenovo,yoga-c630-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Lenovo Yoga C630 Embedded Controller.

maintainers:
- Bjorn Andersson <andersson@kernel.org>

description:
The Qualcomm Snapdragon-based Lenovo Yoga C630 has an Embedded Controller
(EC) which handles things such as battery and USB Type-C. This binding
describes the interface, on an I2C bus, to this EC.

properties:
compatible:
const: lenovo,yoga-c630-ec

reg:
const: 0x70

'#address-cells':
const: 1

'#size-cells':
const: 0

interrupts:
maxItems: 1

patternProperties:
'^connector@[01]$':
$ref: /schemas/connector/usb-connector.yaml#

properties:
reg:
maxItems: 1

unevaluatedProperties: false

required:
- compatible
- reg
- interrupts

additionalProperties: false

examples:
- |+
#include <dt-bindings/interrupt-controller/irq.h>
i2c1 {
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
embedded-controller@70 {
compatible = "lenovo,yoga-c630-ec";
reg = <0x70>;
interrupts-extended = <&tlmm 20 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
connector@0 {
compatible = "usb-c-connector";
reg = <0>;
power-role = "source";
data-role = "host";
};
connector@1 {
compatible = "usb-c-connector";
reg = <1>;
power-role = "source";
data-role = "host";
};
};
};
...
2 changes: 1 addition & 1 deletion drivers/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ obj-$(CONFIG_OLPC_EC) += olpc/
obj-$(CONFIG_GOLDFISH) += goldfish/
obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
obj-$(CONFIG_ARM64) += arm64/
obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/
14 changes: 14 additions & 0 deletions drivers/platform/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,18 @@ config EC_ACER_ASPIRE1
laptop where this information is not properly exposed via the
standard ACPI devices.

config EC_LENOVO_YOGA_C630
tristate "Lenovo Yoga C630 Embedded Controller driver"
depends on I2C
help
Driver for the Embedded Controller in the Qualcomm Snapdragon-based
Lenovo Yoga C630, which provides battery and power adapter
information.

This driver provides battery and AC status support for the mentioned
laptop where this information is not properly exposed via the
standard ACPI devices.

Say M or Y here to include this support.

endif # ARM64_PLATFORM_DEVICES
1 change: 1 addition & 0 deletions drivers/platform/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#

obj-$(CONFIG_EC_ACER_ASPIRE1) += acer-aspire1-ec.o
obj-$(CONFIG_EC_LENOVO_YOGA_C630) += lenovo-yoga-c630.o
Loading

0 comments on commit 427eb78

Please sign in to comment.