From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B07D36B067 for ; Mon, 1 Jun 2026 11:37:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780313842; cv=none; b=AWY38/NpKSeh8LV9uD9AgAPNzRgtMJoGPNi0FojieUJMBRMZn6feJj0IDfYljXGzFE2/Ng237Q2IR6HJjFr4NYDFg6t9QIHShJM8XKERwHruBFTq3MubdrND0shQkNcoMKP7E6SNdAqHEiZxnjkHZWYV9EMfoVuwFQmCCRosI1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780313842; c=relaxed/simple; bh=Zjof0WVULYCBSZ2Pq6gQ3NRucoS9NMNzybSAd/5mwGU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Myfk9eUuVY5qQlqOTqz4+Pv+VUhguX0RxnYwMIa3UWufbapMAIs337pHuvep3qoX0lJt/ku36XC5k4OxwLoS65te4PHq7YiFYMYk0SPCAhz5xzYn6styDAdgeqkIsdYFMiGEAFk+3c0Z+jIf45w+oXziLMx41Wb+HpYFIH/Xw7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=qzEMuI3I; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qzEMuI3I" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-bed2b9bfa02so108578066b.1 for ; Mon, 01 Jun 2026 04:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780313840; x=1780918640; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4Y5aiob/5xwmuKj1NkLrGEbiNwQs8EGYTAf6Wpc7voc=; b=qzEMuI3IznZhj/mJaJMGbw+62j2CONe+W8ZAdHy6nK8t/2EWxbEVLRNap7/Vpp9Ckp 37jt6Qk4e+A7yWpvOjgobHqVFvIftUs3AuuuOQuHTb0vpNIxIFsq32ng2YfaUkknJbY0 SEaLUa9/XA7XAN0ZgpaemkBU0gjyUzQXe1yf0lM4Iar9tMhO53guOEmjDbFXR1BL8xT5 7x1UpDivouBLhMzOycfqPNaYPIjyD1feLOqbkkXTAGMukFwlXLTWdbQXuK6Ezxn/Ngba kMIQOmZSvG48L93MiCU3wmS3dFpFzz++2F9EJz6ZAW36wrYNq7yE6kTKP4VWXTDOa2Ep l4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780313840; x=1780918640; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4Y5aiob/5xwmuKj1NkLrGEbiNwQs8EGYTAf6Wpc7voc=; b=rIYBf0JSHKJ4/yYa25ZDbFQKVjcgxX+M67J32DpielMVZnE210qrFPaAxslQHdZYyI a6/xrBRQczkDP6/cti1pLQYGqb7yswPVUcPa4bu9YXT4R5Kd/XJlE4K/mBDh+9zI3XeS PMO1fFooPqqJPWI59PPriWAcCBXuU9n4TsNLyxZyWMa/5ihv5t6VRTeNNDzt6ZRdAizz CgJGszcO0XoUM7dxt9FzOZbFK4aS8+Q5EFsv6mqodxcuhh8cWZjSKqLOHYvm301eMmbi ZbqGl3XTgJK+2KyNnbwGXIJHUDGY+LHWRdiYblBaVRHkUKlb6s6pI+AUkdO0AA31wDJD mdcA== X-Forwarded-Encrypted: i=1; AFNElJ+NzTLBZXaVqSSeEZI5f2UmfAGEXgUc/mq0oIuJ6OkAHDIjx4siRHPfDabwkU3bnMeRG0rYCvgb851CDKk=@vger.kernel.org X-Gm-Message-State: AOJu0YybjR+uXYQuP6bg0mLAW4NdnkCVbSqscuCWA3PmubbiT45NSq80 2w5VSLwN0IxCOD2V1BV9AQlHXa+nZmfWHmoBmpeUXiMWaqffvEz9fVZo X-Gm-Gg: Acq92OElw1QnbLYkBSpGcBLlItDPnisxcrmvSbP1NSpSqp0JcIBQQ04kt+DC+vrnUWw qJybIpiKxeqvgh9cjWOBKdxmLlbbCoS1flxI3NCIIGQcKlGSVcNa94PDjuLb7OdB7K4DWL4BQge 7AJIvihIkXXa1AJRGV+4wHDyfNsiyxydySuh7xDl40uFx+38o3J6Fu7lqYZWYIGrR5oxrx99WgL sbjFgAbvlPTIlaJKz/kLhnMuwVxIm1TpaR0HIAiuWbPDDvxtNy3kXQnDTC60+mZL004zGcfQzMH rLQF7s4pqxiDbqK2NaRacDWG6C4IEPS0cnTpcdoNMm+50QFaR7qRa+YzLEUspojycpqA3ROtBVP nYQJyELlptMfVfWRFHGVJg+FJQuCISuDDaM9UR5QZ4d43sdVTYTyUMu+8Xt888RlTkAP6I2HDAi dmDzTAE77mwDGsE16KCut1H607irqXImugNTgjENKzSeV5 X-Received: by 2002:a17:906:c151:b0:bee:9d02:6e7c with SMTP id a640c23a62f3a-bee9d032e8amr30809366b.10.1780313839361; Mon, 01 Jun 2026 04:37:19 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bee7bdf4438sm25754166b.55.2026.06.01.04.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 04:37:18 -0700 (PDT) Date: Mon, 1 Jun 2026 14:37:14 +0300 From: Dan Carpenter To: Taha Narimani , Nishad Kamdar Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Greg Kroah-Hartman , "open list:STAGING - INDUSTRIAL IO" , "open list:STAGING SUBSYSTEM" , open list Subject: Re: [PATCH] staging: iio: adc: ad7816: drop busy pin requirement for ad7816 Message-ID: References: <20260530173514.56640-1-tahanarimani3443@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260530173514.56640-1-tahanarimani3443@gmail.com> On Sat, May 30, 2026 at 05:35:12PM +0000, Taha Narimani wrote: > According to the AD7816/7/8 datasheet, the AD7816 is an 8-pin device > and does not possess a BUSY pin. The BUSY pin is exclusive to the > 16-pin AD7817. > > The driver previously requested a 'busy' GPIO unconditionally for both > the AD7816 and AD7817. If a device tree correctly modeled the hardware > by omitting the busy-gpios property for the AD7816, devm_gpiod_get() > would return -ENOENT and cause the probe to fail. > > Fix this by restricting the busy GPIO request strictly to the AD7817. > > Signed-off-by: Taha Narimani The patch is corrupted. Otherwise this seems reasonable enough. (I haven't read the datasheet but I trust that you have). Let's add Nishad to the CC list since he is the one who first limitted it to not check ID_AD7818. The other way to solve this would be to use devm_gpiod_get_optional() in the probe() function and test for NULL in ad7816_spi_read(). I think this would be a cleaner solution because then it works based on the device trees instead of having to hardcode which devices have it in the driver itself. regards, dan carpenter