All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings
@ 2020-07-30 14:58 Dan Murphy
  2020-07-30 14:58 ` [PATCH 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver Dan Murphy
  2020-07-31 22:40 ` [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings Rob Herring
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Murphy @ 2020-07-30 14:58 UTC (permalink / raw)
  To: sre, robh; +Cc: devicetree, r-rivera-matos, linux-pm, linux-kernel, Dan Murphy

Add the bindings for the bq25790.

Signed-off-by: Ricardo Rivera-Matos <r-rivera-matos@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 .../bindings/power/supply/bq25790.yaml        | 87 +++++++++++++++++++
 1 file changed, 87 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/bq25790.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/bq25790.yaml b/Documentation/devicetree/bindings/power/supply/bq25790.yaml
new file mode 100644
index 000000000000..97dd539c1625
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/bq25790.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq25790.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: TI BQ25790 Switch Mode Buck-Boost Charger
+
+maintainers:
+  - Dan Murphy <dmurphy@ti.com>
+
+description: |
+  BQ25790 is a highly integrated switch-mode buck-boost charger for 1-4 cell
+  Li-ion batteries and Li-polymer batteries. The device charges a battery from a
+  wide range of input sources including legacy USB adapters to high voltage USB
+  PD adapters and traditional barrel adapters.
+
+allOf:
+  - $ref: power-supply.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ti,bq25790
+      - ti,bq25792
+
+  reg:
+    maxItems: 1
+
+  ti,watchdog-timer:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      Watchdog timer in milli seconds. 0 (default) disables the watchdog.
+    minimum: 0
+    maximum: 160000
+    enum: [ 0, 500, 1000, 2000, 20000, 40000, 80000, 160000]
+
+  input-voltage-limit-microvolt:
+    description: |
+      Minimum input voltage limit in micro volts with a 100000 micro volt step.
+    minimum: 3600000
+    maximum: 22000000
+
+  input-current-limit-microamp:
+    description: |
+      Maximum input current limit in micro amps with a 100000 micro amp step.
+    minimum: 100000
+    maximum: 3300000
+
+  monitored-battery:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: phandle to the battery node being monitored
+
+required:
+  - compatible
+  - reg
+  - monitored-battery
+
+examples:
+  - |
+    bat: battery {
+      compatible = "simple-battery";
+      constant-charge-current-max-microamp = <2000000>;
+      constant-charge-voltage-max-microvolt = <4200000>;
+      precharge-current-microamp = <160000>;
+      charge-term-current-microamp = <160000>;
+    };
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c0 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      bq25790: charger@6b {
+          compatible = "ti,bq25790";
+          reg = <0x6b>;
+          interrupt-parent = <&gpio1>;
+          interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+          ti,watchdog-timer = <2000>;
+          input-current-limit = <3000000>;
+          input-voltage-limit = <4500000>;
+          monitored-battery = <&bat>;
+      };
+    };
+
+...
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver
@ 2020-08-01 13:42 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-08-01 13:42 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3392 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200730145834.29227-2-dmurphy@ti.com>
References: <20200730145834.29227-2-dmurphy@ti.com>
TO: Dan Murphy <dmurphy@ti.com>
TO: sre(a)kernel.org
TO: robh(a)kernel.org
CC: devicetree(a)vger.kernel.org
CC: r-rivera-matos(a)ti.com
CC: linux-pm(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: Dan Murphy <dmurphy@ti.com>

Hi Dan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on power-supply/for-next]
[also build test WARNING on next-20200731]
[cannot apply to robh/for-next v5.8-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Dan-Murphy/dt-bindings-power-Add-the-bq25790-dt-bindings/20200730-225910
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/power/supply/bq25790_charger.c:170 bq25790_usb_work() warn: ignoring unreachable code.
drivers/power/supply/bq25790_charger.c:624 bq25790_get_property() warn: should this be a bitwise op?
drivers/power/supply/bq25790_charger.c:904 bq25790_hw_init() error: buffer overflow 'bq25790_watchdog_time' 8 <= 8
drivers/power/supply/bq25790_charger.c:912 bq25790_hw_init() error: uninitialized symbol 'wd_reg_val'.

# https://github.com/0day-ci/linux/commit/e5cf0f04730928b191aff54ab64bdd2167b2ecd4
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e5cf0f04730928b191aff54ab64bdd2167b2ecd4
vim +170 drivers/power/supply/bq25790_charger.c

e5cf0f04730928 Dan Murphy 2020-07-30  153  
e5cf0f04730928 Dan Murphy 2020-07-30  154  static void bq25790_usb_work(struct work_struct *data)
e5cf0f04730928 Dan Murphy 2020-07-30  155  {
e5cf0f04730928 Dan Murphy 2020-07-30  156  	struct bq25790_device *bq =
e5cf0f04730928 Dan Murphy 2020-07-30  157  			container_of(data, struct bq25790_device, usb_work);
e5cf0f04730928 Dan Murphy 2020-07-30  158  
e5cf0f04730928 Dan Murphy 2020-07-30  159  	switch (bq->usb_event) {
e5cf0f04730928 Dan Murphy 2020-07-30  160  	case USB_EVENT_ID:
e5cf0f04730928 Dan Murphy 2020-07-30  161  		break;
e5cf0f04730928 Dan Murphy 2020-07-30  162  
e5cf0f04730928 Dan Murphy 2020-07-30  163  	case USB_EVENT_NONE:
e5cf0f04730928 Dan Murphy 2020-07-30  164  		power_supply_changed(bq->charger);
e5cf0f04730928 Dan Murphy 2020-07-30  165  		break;
e5cf0f04730928 Dan Murphy 2020-07-30  166  	}
e5cf0f04730928 Dan Murphy 2020-07-30  167  
e5cf0f04730928 Dan Murphy 2020-07-30  168  	return;
e5cf0f04730928 Dan Murphy 2020-07-30  169  
e5cf0f04730928 Dan Murphy 2020-07-30 @170  	dev_err(bq->dev, "Error switching to charger mode.\n");
e5cf0f04730928 Dan Murphy 2020-07-30  171  }
e5cf0f04730928 Dan Murphy 2020-07-30  172  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36721 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-05 20:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 14:58 [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings Dan Murphy
2020-07-30 14:58 ` [PATCH 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver Dan Murphy
2020-07-30 15:14   ` Ricardo Rivera-Matos
2020-08-05 11:59   ` Dan Carpenter
2020-08-05 11:59     ` Dan Carpenter
2020-08-05 11:59     ` Dan Carpenter
2020-07-31 22:40 ` [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings Rob Herring
2020-08-01 13:42 [PATCH 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.