From patchwork Sat Jun 20 20:12:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 191277 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1664544ilo; Sat, 20 Jun 2020 13:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjcbm1/u0mWwn6qlU65osawdqAB3y9lhFWUuKPgb1kWTfjHUB/ewq78XEufretRs1HZ7ZN X-Received: by 2002:a50:da83:: with SMTP id q3mr9717660edj.325.1592684035161; Sat, 20 Jun 2020 13:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592684035; cv=none; d=google.com; s=arc-20160816; b=V+jju1n9r4FvI+u/OiZImwgXafLqRjdrJQU+BylD4PyclDbXMQx9mEbUdOecVKYN9l DGN7oloBBViLkMUEz0szgFaTt+ius7eG7FYANxuZUeObGmErhOkqcuPkDzEAb/S/ytWp REQj56VOEyftwW0N9seAbo35+tS7rGahsfqqPklxxo1ckuplOSY90Cwe8ZsMKIGVidhV 4E2lPuIv5peruyh3/5s5Tm5zBdsSytiO/8fdSFRJ5kFE6rNgPpZUQ7I8lnN1jekyfScT pGNhB9w4GGUVri7Br9LfKj+k7ZDaLyw6Gyq09YlRsEd62JCmdVykolUbovQKjiTo3z0K AjOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oOji5s1j3V7J+9EQS5KPt58NPGIcuQSZTULzhnPF9e8=; b=hz9OiGMJo4mBa0FbwXiJEFa/HEN7ArSuWar6y8bWB+Xyg62ekWWZ7rNSz8CQaDT7c2 pRCrvYwYhA/U57pMw7+NyLJ+7i+bNIFr5ePwM02bM7INMZOGXjliGWVaQwaTlUgCsXOW dand/ekmXGDQZ6TJw30e2zBU6bOOgGqnkpAxvdBuzXrW5OcBhMhutrgheV6kXcUQnlUV w48s96uw1g2ZIpsu+VpY9bxaSmfwKaEim+ckNmhHO2JiBhcwEwQy+KIXW558o8T8W5Eh QhkwkYqpS94qhHdHclpq2Kdj8lOhhRFk8vdn/aTGDa4gmoJKgDfQrbNxh70vSCY+SnRT Iq6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x5bOq+FW; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si6421620edm.379.2020.06.20.13.13.54; Sat, 20 Jun 2020 13:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x5bOq+FW; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728730AbgFTUNy (ORCPT + 5 others); Sat, 20 Jun 2020 16:13:54 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:36264 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbgFTUNx (ORCPT ); Sat, 20 Jun 2020 16:13:53 -0400 Received: by mail-lf1-f67.google.com with SMTP id c21so7466045lfb.3 for ; Sat, 20 Jun 2020 13:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oOji5s1j3V7J+9EQS5KPt58NPGIcuQSZTULzhnPF9e8=; b=x5bOq+FWlXVJ/dejXmuf7HApMGjFOf2Y7gBpta7iAPf1chpGD/Q8sDtcqcBllAEt4n 2KA+1CWn0l2d/CuuqNcR3ljwjiO1PeNC7AG8ZvP/jQOIi6+6B71cONIhXhkDRNHUDQO6 ukq+Y4vDLjpHQS7VCgafx9tD2ZtIEPxIE66P1DGGtzpImKWR+YVm03mukFRRt1x7oDQ8 OUzW6PEI4s2LWPwxxjBu+QGHYS6Ddb6O5fTM1IlQO1FD4i3V8xcooxwBT0GJmbLBHxEX w/+JdIZY37q14L60+pY1CMQpwujbea/L3WEGiDXXO3qfnvDronSj+5xREydtUJLCnQ46 lSJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oOji5s1j3V7J+9EQS5KPt58NPGIcuQSZTULzhnPF9e8=; b=rWnMlIOZ8cBYbOrtihP0U15RnWk8Fsz/0M+3n1f5s4zNecJkAERjn/T9f5uJ1hfJM7 MI3yT5ZWSJd5HvRwvL/KTlrVkUPDaYK1hld6nUcMedxJX0DI79QdjlcBUNzkS3GBQMzQ jhWlkeGXX2CQiCevyEksV7lJNOHFgTnpWEOkjWTXz0jeBMf+AAf4T8UduEGPZilA7RXL tPh6nDqkHoNdf1vQV4i1I0Tou8K/QQ3+3jRNHO0wrkjbmis3kkVu/3TgnsdOcwRGpJGK hvSQwMVkEeCuXmSeaMS/K6Mi6QtjhBkkjCnJH/QJyMq2SWvUlZzc1h1Ti7b2eoAvzBSS tDfQ== X-Gm-Message-State: AOAM533yGuP6cr8KdRbwyTTox+GOM4jpVyURTNXjVwnAfUmlAII+Huak 99Pbg5myBabZvrJt06KQUkUidx4JJHw= X-Received: by 2002:a19:87c2:: with SMTP id j185mr5001058lfd.183.1592683971619; Sat, 20 Jun 2020 13:12:51 -0700 (PDT) Received: from genomnajs.lan (81-26-241-46.customers.ownit.se. [81.26.241.46]) by smtp.gmail.com with ESMTPSA id h28sm1829983ljb.52.2020.06.20.13.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 13:12:51 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Sebastian Reichel Subject: [PATCH v2] gpio: Add gpio-charger to the documentation Date: Sat, 20 Jun 2020 22:12:48 +0200 Message-Id: <20200620201248.28843-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The GPIO-based charger is another of the helpful devices built on top of GPIO. Cc: Sebastian Reichel Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - We are checking for the AC charger not the battery per se. --- Documentation/driver-api/gpio/drivers-on-gpio.rst | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.25.4 diff --git a/Documentation/driver-api/gpio/drivers-on-gpio.rst b/Documentation/driver-api/gpio/drivers-on-gpio.rst index 820b403d50f6..41ec3cc72d32 100644 --- a/Documentation/driver-api/gpio/drivers-on-gpio.rst +++ b/Documentation/driver-api/gpio/drivers-on-gpio.rst @@ -89,6 +89,13 @@ hardware descriptions such as device tree or ACPI: Consumer Electronics Control bus using only GPIO. It is used to communicate with devices on the HDMI bus. +- gpio-charger: drivers/power/supply/gpio-charger.c is used if you need to do + battery charging and all you have to go by to check the presence of the + AC charger or more complex tasks such as indicating charging status using + nothing but GPIO lines, this driver provides that and also a clearly defined + way to pass the charging parameters from hardware descriptions such as the + device tree. + Apart from this there are special GPIO drivers in subsystems like MMC/SD to read card detect and write protect GPIO lines, and in the TTY serial subsystem to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The