From patchwork Thu Nov 17 09:01:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoniu Miclaus X-Patchwork-Id: 21513 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp292093wrr; Thu, 17 Nov 2022 01:07:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7mpTMcECebn/yqe0DN9a1POjFq1t+c3kbLjAjfQ4EFXhvG2NN/GyGNRaclMTkNBGq6Uo6G X-Received: by 2002:a05:6402:43c7:b0:468:cd3a:4493 with SMTP id p7-20020a05640243c700b00468cd3a4493mr885731edc.309.1668676030373; Thu, 17 Nov 2022 01:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668676030; cv=none; d=google.com; s=arc-20160816; b=tWeijec7AOGuuzyQGQhMoA5q26zLULmx/4o3TLoYH3r/ab9NWwCor2fvaSr34GO6dv UY4HeAI9pDVhJHYN7/OPNoXWU7wVVJMG4w+xJwMunfQM4514bhkhvWTS3+d3Vk7zckz3 84RcyTG2zdycUH8ltIkSeDEZttJU9b4dBjLgYJhXLMAITHi7pnaRi8JtjdyxzAALrgyg IAn6W3/pVdERc7oAQSqjDNyxPztOzeyMpK5ad08LLS13ngfbz/y7iNGJZX+MTqjejQUu unzQ5tRisgrQ+7fRHqHwCD0lSbfVhkjPiFljH/SNDVCJ9DriUU0t9D+0xlsdj+Ax1Jix qjbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=89XzHh2+s9fZyaVZ2k2zyIPSczNreXwdEWHrkXYXtPQ=; b=ZZw+oR8kDHPVaiP1k1AUiTYpzDMOqbqm5Gb5NKVg2ptbrnAVTAMIAynn3m8heW5Gn/ 7gXnxuxKdcSbJWNoh2x+rELDpsDCljs4jttQbrEOJ2G9is/yYEwjbckNcIav+Y/VrgEB ZZ3BC7cd3VvhKibwvutrnZCfOEPbZhdIR4mE1c0WHXrW654mp8PG4YtCUMvA/T4I0HHe hTAGc0U4I86sULAtKtpZBVXs1OJTYeV4d18IJlqMOmnsj3qT5yRJsB1Ne33Ko+kkfj14 rA4Qtc9rbfaYaHcjJuXIFfOU3m3/83Y8J3XJs/GkDaNeDMMRmP8q5Sc2LhRriQUcph1H x2zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402430a00b0045c98bb5359si468278edc.590.2022.11.17.01.06.47; Thu, 17 Nov 2022 01:07:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239268AbiKQJCC (ORCPT + 99 others); Thu, 17 Nov 2022 04:02:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239439AbiKQJB5 (ORCPT ); Thu, 17 Nov 2022 04:01:57 -0500 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6187559149; Thu, 17 Nov 2022 01:01:56 -0800 (PST) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AH7n6nY003733; Thu, 17 Nov 2022 04:01:51 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3kwgw4rg03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Nov 2022 04:01:50 -0500 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 2AH91nBH004105 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Nov 2022 04:01:49 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 17 Nov 2022 04:01:48 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 17 Nov 2022 04:01:48 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 17 Nov 2022 04:01:48 -0500 Received: from amiclaus-VirtualBox.ad.analog.com (AMICLAUS-L02.ad.analog.com [10.48.65.121]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 2AH91dQM020374; Thu, 17 Nov 2022 04:01:41 -0500 From: Antoniu Miclaus To: , , CC: Antoniu Miclaus Subject: [PATCH] drivers: iio: dac: ad5592r: add gpio_chip names Date: Thu, 17 Nov 2022 11:01:30 +0200 Message-ID: <20221117090130.51702-1-antoniu.miclaus@analog.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: jZc6A2xlq7rdUNNqwykqQIO3WcUtfw65 X-Proofpoint-ORIG-GUID: jZc6A2xlq7rdUNNqwykqQIO3WcUtfw65 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-17_04,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 impostorscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211170068 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749733636922766502?= X-GMAIL-MSGID: =?utf-8?q?1749733636922766502?= Add array of explicit gpio names for the `gpiochip` structure of ad5592r, mainly for debug purposes. Since the gpios are configurable via the dts, generic names are used. Signed-off-by: Antoniu Miclaus --- drivers/iio/dac/ad5592r-base.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c index 7a9b5fc1e579..076bc9ecfb49 100644 --- a/drivers/iio/dac/ad5592r-base.c +++ b/drivers/iio/dac/ad5592r-base.c @@ -124,6 +124,10 @@ static int ad5592r_gpio_request(struct gpio_chip *chip, unsigned offset) return 0; } +static const char * const ad5592r_gpio_names[] = { + "GPIO0", "GPIO1", "GPIO2", "GPIO3", "GPIO4", "GPIO5", "GPIO6", "GPIO7", +}; + static int ad5592r_gpio_init(struct ad5592r_state *st) { if (!st->gpio_map) @@ -140,6 +144,7 @@ static int ad5592r_gpio_init(struct ad5592r_state *st) st->gpiochip.set = ad5592r_gpio_set; st->gpiochip.request = ad5592r_gpio_request; st->gpiochip.owner = THIS_MODULE; + st->gpiochip.names = ad5592r_gpio_names; mutex_init(&st->gpio_lock);