Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3703585ybi; Mon, 29 Jul 2019 11:05:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPgpDJgwWvJXYnKKjHxuoYw5ZOsBJhyfhhkW8U7MhSjY4dtrflOAI+TY0gajmkZ1sfFraE X-Received: by 2002:a17:90a:77c5:: with SMTP id e5mr108724694pjs.109.1564423530768; Mon, 29 Jul 2019 11:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564423530; cv=none; d=google.com; s=arc-20160816; b=1AaPeRoxkxUEEtmBDyeJgANdTyTCHqtPiYM5y7iSpY/ompaOGzVDjtI3mZMvIjTunA Rj2ZxP7f1fDpe1Zlx16j+hUWGp1PJu2YqTFveh5BlyyQqO+8rK6IGWeyPpSM2WHIiwvi Ny2TZoJI9oWK8asIwPBgOYnJ3MCfXbQw0ynxei/gjHoHXecZ8gF+rX09de1F2haTHGz/ /HllN/uSP38RJcNqUkR/0aOkhwCnQL9b8KOIRUyc4OsdRQrH94F1XRJ0Qa0Tzksdpld2 GH0WShqWPdNExHtldinB3/oKxeDVLeQhEqM3H+IoTfnMrR00JCEGAhoXvUIolo06msVn uPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Kf6mHtOESsneDtQ4973VpF9wcVghxd+1SEWFvdSFOyM=; b=u44kg/bvlMacQYLad0l0y9WbD3r3cJv4PuNx/+L6pQVjW4d102uJE11XG0zfsLixMn q4ewBjzu2O2f2USRHPD2epO8qMPhbSaOwhHsyTREmM48XVCiR8xpJpGwNmYi6ef9pMJO TXYqsi+39Qgpa+pkOrboSYFJrBl5xYc1MXDOh3lRrBZZFcGiIZX371xP9J55GkCuxxBa fW2myrzBH5dbhqeF+NkFuXXrBbMDt4xhi3BjDJYTbPUe6FRgdjSqjPMz7ocDDsWpgLv1 rEHTo/n6LbFigGEchftWPCUUUBoB2J79qRvFyxa0I2bGoCbIKcLxpAmC3jcn/Mq8S/if fJxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si24093992pjo.102.2019.07.29.11.05.14; Mon, 29 Jul 2019 11:05:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728544AbfG2Ojf (ORCPT + 99 others); Mon, 29 Jul 2019 10:39:35 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:54007 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfG2Ojf (ORCPT ); Mon, 29 Jul 2019 10:39:35 -0400 Received: from orion.localdomain ([77.4.29.213]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M1YtP-1hp5sB08vT-0037Xk; Mon, 29 Jul 2019 16:39:28 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: info@metux.net, dvhart@infradead.org, andy@infradead.org, platform-driver-x86@vger.kernel.org Subject: [PATCH] platform: x86: pcengines-apu2: wire up simswitch gpio as led Date: Mon, 29 Jul 2019 16:39:26 +0200 Message-Id: <1564411166-23693-1-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K1:ltH4E6R4g0MxzsYo+40DFZlGZaVFzz+3zZNAt208kreFs5oy0FK AJjK8OeYKHEomYfHh44Xg8P556HSBdZXlghN2ZgKMsbS0GuvoDD4JYWUkqtnoDKgZrGdDrI lu6Bub97UEYu0DT9FmY7qBZdI99gn7nHQCLieoDw7ndWdGw8MQWRKNXxjM0AVzCaYn/ZOWk dV0Cr1YlHvoP0MEVfHGZw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:6drEupQFt28=:F1fb72R9MNDngMBysdYa3W cDk718OJ0qyn02ZMnWUnhANgFu0pZOkbpfwH17U2XlR79UI+E9ayvLKIn9PZPrc6GA4BinS8o vtXaui5h52kbU2ISmExV5l3jZ7lAjJCW84Qw823dL9r8bnN5sMkNpilI9Uqrj9W/goZ3Gdc1q eyo6+xZTMg8vCBPcrn8VMpIZiCct38RsaSFpCSVV97RKSosr300Xs0z0oD5lY6SikP6ThdRsx mfF4MfVpKWCA8yrsP9H3dOGAPXoNsqPdkFEQ0apbF81hMyNU00YPlrIvkgqG0ipuS0ZIlL93x G7SJ/1tQ214psaOSwh+bORdu9emSyHGVlzbudCas60rOvEqRmQGtBMih8ZC2Y+jHVaK5Alpng US9AdIIMSBYeu1Nt84M/AgNjGYPu9n6suVJjbMIZHQXWCTJUvGWObXP1UcVK1rjZko0+YNegk ADV6jOs1nR2a95sFDWs9foQ142A5lQeicUQ5SIEsDPcM05DeiFYVSZPeHvDKIfoM+K53YHCNr wL24noL1DyBMw0wfQXQybKbde45Pui/l6a8+w3Y5MKmFN47l7b1pCav0boO+OWVEdR9RVL3CL a9KpOJWKQss8AqR6opKVNXrmVZX3y0TVGzgsKznNFh1WKFb8cjmM0SAc6cF6MThBtJ+L+nxlp 0+n2boCO2OAkpbYr0Vc3ErArPgSpIELzd64VvKx+Yx09wIoJaKsWi0Ir7m28LBKbmV+HR0IYh eCKOkdb9+59JNvVUcKch8y5KVCuO9ndBhKfs/Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Enrico Weigelt The APU3+ boards have two SIM sockets, while only one of them can be routed to the mpcie slots at a time. Selection is done via simswap gpio. We currently don't have a fitting subsystem for those cases yet, so just wire it up to a LED for the time being. While this isn't really semantically correct, it's a good compromise. Signed-off-by: Enrico Weigelt --- drivers/platform/x86/pcengines-apuv2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/pcengines-apuv2.c b/drivers/platform/x86/pcengines-apuv2.c index b0d3110..adecd6a 100644 --- a/drivers/platform/x86/pcengines-apuv2.c +++ b/drivers/platform/x86/pcengines-apuv2.c @@ -69,7 +69,8 @@ static const struct gpio_led apu2_leds[] = { { .name = "apu:green:1" }, { .name = "apu:green:2" }, - { .name = "apu:green:3" } + { .name = "apu:green:3" }, + { .name = "apu:simswap" }, }; static const struct gpio_led_platform_data apu2_leds_pdata = { @@ -86,6 +87,8 @@ NULL, 1, GPIO_ACTIVE_LOW), GPIO_LOOKUP_IDX(AMD_FCH_GPIO_DRIVER_NAME, APU2_GPIO_LINE_LED3, NULL, 2, GPIO_ACTIVE_LOW), + GPIO_LOOKUP_IDX(AMD_FCH_GPIO_DRIVER_NAME, APU2_GPIO_REG_SIMSWAP, + NULL, 3, GPIO_ACTIVE_LOW), } }; -- 1.9.1