Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1006028rdb; Sun, 1 Oct 2023 15:37:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4+iBFnOlKaq1XwuxHma6FNsYB9GH8DExfhhzAKNeveyPzO3yb8m66uofm8TdAidnmtuyI X-Received: by 2002:a05:6a00:993:b0:68f:cf6f:e21e with SMTP id u19-20020a056a00099300b0068fcf6fe21emr11944406pfg.28.1696199841485; Sun, 01 Oct 2023 15:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696199841; cv=none; d=google.com; s=arc-20160816; b=QpD44uL0ffmlDwRcFxEShyOvEDzXvVAV8hDYB2nRWnxtyiybi427eVN3Bpi+YIOTDn YDFragjuaFSc4tv9jyDh1Qm6iSFfiK7akguEdLEAPJDO89VOaVHDaeBTh/w+amcNnw7S 9PEVR3s5KqaoaAYGJMiFxMdt5NiheiFvsrUAUoq7DrNtC4mgBbyGiAVneo/6s4yb7JAU uJrY/LSqiyxqQ1+GnsrJTZOPI+dunnH7nrdVWKse2YHhrvkBHg5uqC9qwVVLiLiZScnN rP7l/CxPXyQ3v4gEpTcFEvZ7lUT41Fo/24L6f/0i52ABx+psxGhStATwNkXPSYdLJdHn xY4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=rK00HEZ5YDC5fgupWtwn5RbfXLyu48CvHajyLn1vZzk=; fh=8cwGh3PX0tKRS/k+k9rLojZhhupzfpttKpOjs3mxuRw=; b=l0W2PJBksgWcKZUVYlTnrfNG6d23H1mXjcXZhvrZ3WyKHE5dPPdJfciLIZ/B2bCDQt mzUrQxOK5yzYWklPgJfKJ9V96Cxo8Sn8wDaGURDGQNbcTNnwt21L58BhqaSjnUAAroK8 TVNWAyuxywZscF9AlHM9ouwC1BWhdDNOE1eCrAoZLOiWeZJzq9uy5xT9IOm64n8injFE Z4+vgXsj871s86osHUZa5t+5UKuwOofO8e4fuVvpkens/mPGZG5jqb3EJXImXcwVFgyL vJv8nk0hZAxe+HReOCn+CvdxqKNb/wp9CZGblRA04KQV8YfkxhHyDdZJJfiGq5O47FCy O6yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XsAlxsRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f31-20020a056a000b1f00b0068a85532963si24046825pfu.160.2023.10.01.15.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 15:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XsAlxsRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 32F658028FFE; Sun, 1 Oct 2023 07:57:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235113AbjJAO4v (ORCPT + 99 others); Sun, 1 Oct 2023 10:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbjJAO4t (ORCPT ); Sun, 1 Oct 2023 10:56:49 -0400 Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6048D8; Sun, 1 Oct 2023 07:56:47 -0700 (PDT) Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-57b8cebf57dso7003039eaf.0; Sun, 01 Oct 2023 07:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696172207; x=1696777007; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rK00HEZ5YDC5fgupWtwn5RbfXLyu48CvHajyLn1vZzk=; b=XsAlxsRNnIkHVdeS2CABW2+aUnCiWrFFAg20qlf6S3msToBY10e9uB4tSfMf+wEKI/ 26ZNvF84GS7p71wESpNHeaAt6qHpPtzG3LBvNIs/UO9YwW+n97nBPUvUc3h2xMnDJn6P 6bteLPQfqiOn6aU8U7w0OjhKLC+n9ZPYYFK9Ux3b5v3Vgn0Pz5iA5OG5gPt7ihMwv/6a UgxNbAjcslQREa8KiGaftf6YTkkjWezEv6JpPANKRgGPt4noKDFP0NosDEopwkO5uuSY NdOHnpJTm6c/aK+URx+GlQy3bJNVFtdsjsxiyrA5U6/ctLFKnwZUbmxX3AMD+UplgEUZ oltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696172207; x=1696777007; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rK00HEZ5YDC5fgupWtwn5RbfXLyu48CvHajyLn1vZzk=; b=IFAgDU0lMsTJDJ9gUjGZFSJpQUez0BYqHm3uU/YAZp2auLKWQQB/jACXBgTwgKpuEE ry5XF+ZT9M0B/scnY2PMa6HpImSY5waAkSdcUABhND6i+Fs1aQo3/jjFbslLtLvOlsQh zLeAomeaiutVjdoJHRjHF6qtuXJM/M1LXc24KEQ0E3WcMSASj1Qj8Ksho7UOR5RoTcNH lvGWuwjayiKnhANds6eBrlxNsikk7CBTOnz7wupMWdySxkiD5WPBK+DdiMmQYrpChFKt VlXypathRK1WjIaJdsrgi+5R+56aeP/fNm+i77XxwyAwwny4Owk8mdzDi4qXI2jVlL95 gkTA== X-Gm-Message-State: AOJu0Yxw5JS9Jo9oXBC4hOVkipW8+E1BkQ8c9Y0640r7O1sre/+3kogA ZlKvYgRPkr5s2hM0+aetd6/T1vsoqLwIod7T9sw= X-Received: by 2002:a4a:85cd:0:b0:57b:7145:310f with SMTP id u13-20020a4a85cd000000b0057b7145310fmr8359787ooh.0.1696172206949; Sun, 01 Oct 2023 07:56:46 -0700 (PDT) MIME-Version: 1.0 References: <20231001-pxa-gpio-v4-0-0f3b975e6ed5@skole.hr> <20231001-pxa-gpio-v4-6-0f3b975e6ed5@skole.hr> In-Reply-To: <20231001-pxa-gpio-v4-6-0f3b975e6ed5@skole.hr> From: Andy Shevchenko Date: Sun, 1 Oct 2023 17:56:11 +0300 Message-ID: Subject: Re: [PATCH RFC v4 6/6] input: ads7846: Move wait_for_sync() logic to driver To: =?UTF-8?Q?Duje_Mihanovi=C4=87?= Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Dmitry Torokhov , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-spi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 01 Oct 2023 07:57:17 -0700 (PDT) On Sun, Oct 1, 2023 at 5:13=E2=80=AFPM Duje Mihanovi=C4=87 wrote: > > If this code is left in the board file, the sync GPIO would have to be > separated into another lookup table during conversion to the GPIO > descriptor API (which is also done in this patch). > > The only user of this code (Sharp Spitz) is also converted in this > patch. Suggested-by: Linus... ? ... > +static void ads7846_wait_for_sync(struct ads7846 *ts) I would name it ..._wait_for_sync_gpio. ... > + ts->sync =3D devm_gpiod_get_optional(dev, "sync", GPIOD_IN); > + if (IS_ERR(ts->sync)) { > + dev_err(dev, "Failed to get sync GPIO: %pe\n", ts->sync); > + return PTR_ERR(ts->sync); return dev_err_probe(...); ? > + } --=20 With Best Regards, Andy Shevchenko