From patchwork Wed May 29 08:34:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10966491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46BCD16C1 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39F2528872 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28E6D288B3; Wed, 29 May 2019 08:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 856EB28874 for ; Wed, 29 May 2019 08:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725917AbfE2Iea (ORCPT ); Wed, 29 May 2019 04:34:30 -0400 Received: from shell.v3.sk ([90.176.6.54]:41382 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfE2Iea (ORCPT ); Wed, 29 May 2019 04:34:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 106A01049C5; Wed, 29 May 2019 10:34:25 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QJSnMOpAVH2B; Wed, 29 May 2019 10:34:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 99B0A1049C7; Wed, 29 May 2019 10:34:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nr8BQ_lQGUXr; Wed, 29 May 2019 10:34:09 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id AA0121049C3; Wed, 29 May 2019 10:34:08 +0200 (CEST) From: Lubomir Rintel To: Andy Shevchenko Cc: Darren Hart , Randy Dunlap , YueHaibing , platform-driver-x86@vger.kernel.org, Lubomir Rintel , kbuild test robot Subject: [PATCH 1/4] Platform: OLPC: Make olpc_dt_compatible_match() static __init Date: Wed, 29 May 2019 10:34:02 +0200 Message-Id: <20190529083405.332762-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190529083405.332762-1-lkundrak@v3.sk> References: <20190529083405.332762-1-lkundrak@v3.sk> Reply-To: "[PATCH 0/4]"@zimbra.v3.sk, "Platform:OLPC:A"@zimbra.v3.sk, couple@zimbra.v3.sk, of@zimbra.v3.sk, bug@zimbra.v3.sk, fixes@zimbra.v3.sk MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Addresses a kbuild warning: >> WARNING: vmlinux.o(.text+0x3b764): Section mismatch in reference from the function olpc_dt_compatible_match() to the function .init.text:olpc_dt_getproperty() Signed-off-by: Lubomir Rintel Reported-by: kbuild test robot Fixes: a7a9bacb9a32 (x86/platform/olpc: Use a correct version when making up a battery node) --- arch/x86/platform/olpc/olpc_dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index 0296c5b55e6f..114c52986568 100644 --- a/arch/x86/platform/olpc/olpc_dt.c +++ b/arch/x86/platform/olpc/olpc_dt.c @@ -220,7 +220,7 @@ static u32 __init olpc_dt_get_board_revision(void) return be32_to_cpu(rev); } -int olpc_dt_compatible_match(phandle node, const char *compat) +static int __init olpc_dt_compatible_match(phandle node, const char *compat) { char buf[64], *p; int plen, len; From patchwork Wed May 29 08:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10966495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AE0276 for ; Wed, 29 May 2019 08:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1F8128872 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E657728874; Wed, 29 May 2019 08:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9920E28889 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbfE2Ieb (ORCPT ); Wed, 29 May 2019 04:34:31 -0400 Received: from shell.v3.sk ([90.176.6.54]:41400 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfE2Ieb (ORCPT ); Wed, 29 May 2019 04:34:31 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 04D3B1049C3; Wed, 29 May 2019 10:34:29 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id uVHCz67Ay1v9; Wed, 29 May 2019 10:34:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 8824B1049CE; Wed, 29 May 2019 10:34:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TzR2w58CsTy6; Wed, 29 May 2019 10:34:09 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id E1CD91049C4; Wed, 29 May 2019 10:34:08 +0200 (CEST) From: Lubomir Rintel To: Andy Shevchenko Cc: Darren Hart , Randy Dunlap , YueHaibing , platform-driver-x86@vger.kernel.org, Lubomir Rintel Subject: [PATCH 2/4] Platform: OLPC: Fix olpc_xo175_ec_cmd() return value Date: Wed, 29 May 2019 10:34:03 +0200 Message-Id: <20190529083405.332762-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190529083405.332762-1-lkundrak@v3.sk> References: <20190529083405.332762-1-lkundrak@v3.sk> Reply-To: "[PATCH 0/4]"@zimbra.v3.sk, "Platform:OLPC:A"@zimbra.v3.sk, couple@zimbra.v3.sk, of@zimbra.v3.sk, bug@zimbra.v3.sk, fixes@zimbra.v3.sk MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reset the ret variable to make sure it olpc_xo175_ec_cmd() ends up returning zero on success. Fixes: commit 0c3d931b3ab9 ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: Lubomir Rintel --- drivers/platform/olpc/olpc-xo175-ec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c index 344d14f3da54..48d6f0d87583 100644 --- a/drivers/platform/olpc/olpc-xo175-ec.c +++ b/drivers/platform/olpc/olpc-xo175-ec.c @@ -507,6 +507,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp, nr_bytes = resp_len; } else { nr_bytes = (size_t)ret; + ret = 0; } resp_len = min(resp_len, nr_bytes); From patchwork Wed May 29 08:34:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10966493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA58818EC for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD98F28872 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0F8628894; Wed, 29 May 2019 08:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BD6828874 for ; Wed, 29 May 2019 08:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726008AbfE2Ieb (ORCPT ); Wed, 29 May 2019 04:34:31 -0400 Received: from shell.v3.sk ([90.176.6.54]:41391 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfE2Iea (ORCPT ); Wed, 29 May 2019 04:34:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6CF901049C4; Wed, 29 May 2019 10:34:26 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ra_3GaY-uws1; Wed, 29 May 2019 10:34:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CE8D21049CF; Wed, 29 May 2019 10:34:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XxDNslYLOcYN; Wed, 29 May 2019 10:34:09 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 268681049C5; Wed, 29 May 2019 10:34:09 +0200 (CEST) From: Lubomir Rintel To: Andy Shevchenko Cc: Darren Hart , Randy Dunlap , YueHaibing , platform-driver-x86@vger.kernel.org, Lubomir Rintel Subject: [PATCH 3/4] Platform: OLPC: Require CONFIG_POWER_SUPPLY for XO-1.75 EC Date: Wed, 29 May 2019 10:34:04 +0200 Message-Id: <20190529083405.332762-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190529083405.332762-1-lkundrak@v3.sk> References: <20190529083405.332762-1-lkundrak@v3.sk> Reply-To: "[PATCH 0/4]"@zimbra.v3.sk, "Platform:OLPC:A"@zimbra.v3.sk, couple@zimbra.v3.sk, of@zimbra.v3.sk, bug@zimbra.v3.sk, fixes@zimbra.v3.sk MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ERROR: "power_supply_put" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! ERROR: "power_supply_changed" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! ERROR: "power_supply_get_by_name" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! Adding the dependency seems like a more reasonable thing compared to ifdef-ing the bits, as if one has an XO-1.75 they almost certainly want a baterry and AC adapter support. Reported-by: Randy Dunlap Signed-off-by: Lubomir Rintel Acked-by: Randy Dunlap --- drivers/platform/olpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/olpc/Kconfig b/drivers/platform/olpc/Kconfig index 1fa676c5e7fa..6f35c01254e5 100644 --- a/drivers/platform/olpc/Kconfig +++ b/drivers/platform/olpc/Kconfig @@ -7,6 +7,7 @@ config OLPC_XO175_EC depends on ARCH_MMP || COMPILE_TEST depends on SPI_SLAVE depends on INPUT + depends on POWER_SUPPLY select OLPC_EC help Include support for the OLPC XO Embedded Controller (EC). The EC From patchwork Wed May 29 08:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10966497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A9DC716C1 for ; Wed, 29 May 2019 08:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CC2B28872 for ; Wed, 29 May 2019 08:34:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 911D228889; Wed, 29 May 2019 08:34:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33DCB28872 for ; Wed, 29 May 2019 08:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726005AbfE2Iec (ORCPT ); Wed, 29 May 2019 04:34:32 -0400 Received: from shell.v3.sk ([90.176.6.54]:41396 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfE2Ieb (ORCPT ); Wed, 29 May 2019 04:34:31 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 950841049C9; Wed, 29 May 2019 10:34:28 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GR2ySgjGlqCT; Wed, 29 May 2019 10:34:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 8AF8F1049C3; Wed, 29 May 2019 10:34:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5fEFfgc9UceQ; Wed, 29 May 2019 10:34:10 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 5FE0E1049C6; Wed, 29 May 2019 10:34:09 +0200 (CEST) From: Lubomir Rintel To: Andy Shevchenko Cc: Darren Hart , Randy Dunlap , YueHaibing , platform-driver-x86@vger.kernel.org, Lubomir Rintel Subject: [PATCH 4/4] Platform: OLPC: Add a config menu category for XO 1.75 Date: Wed, 29 May 2019 10:34:05 +0200 Message-Id: <20190529083405.332762-5-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190529083405.332762-1-lkundrak@v3.sk> References: <20190529083405.332762-1-lkundrak@v3.sk> Reply-To: "[PATCH 0/4]"@zimbra.v3.sk, "Platform:OLPC:A"@zimbra.v3.sk, couple@zimbra.v3.sk, of@zimbra.v3.sk, bug@zimbra.v3.sk, fixes@zimbra.v3.sk MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Randy Dunlap says: drivers/platform/olpc/Kconfig needs to use "menuconfig" like all of the other Kconfig files in drivers/platform/ so that its menu is listed in the correct place in *config interfaces. Otherwise he's sad. Reported-by: Randy Dunlap Signed-off-by: Lubomir Rintel Acked-by: Randy Dunlap --- drivers/platform/olpc/Kconfig | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/platform/olpc/Kconfig b/drivers/platform/olpc/Kconfig index 6f35c01254e5..919b489e24e8 100644 --- a/drivers/platform/olpc/Kconfig +++ b/drivers/platform/olpc/Kconfig @@ -2,9 +2,19 @@ config OLPC_EC select REGULATOR bool +menuconfig OLPC_XO175 + bool "Platform support for OLPC XO 1.75 hardware" + depends on ARCH_MMP || COMPILE_TEST + help + Say Y here to get to see options for the ARM-based OLPC platform. + This option alone does not add any kernel code. + + Unless you have an OLPC XO laptop, you will want to say N. + +if OLPC_XO175 + config OLPC_XO175_EC tristate "OLPC XO 1.75 Embedded Controller" - depends on ARCH_MMP || COMPILE_TEST depends on SPI_SLAVE depends on INPUT depends on POWER_SUPPLY @@ -15,3 +25,5 @@ config OLPC_XO175_EC button, restart, shutdown and battery charging status. Unless you have an OLPC XO laptop, you will want to say N. + +endif # OLPC_XO175