Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1346057lqh; Mon, 6 May 2024 05:15:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWP0raDZf0neCqveXN2OjhMLHkhq1A5Kmb4PmHwUoBf7bT06uV4IsTANO/81lRBtKB9p+ZwzFTHzLm3WxDWN0GFf2wPF6UphGmsShn7Pg== X-Google-Smtp-Source: AGHT+IEZPd3USHj8OCsnk5qS9gH1eTaWfUXxalbdYe3Yu6bSvl/bdtBGLUIic0emJXJ91tegSfpT X-Received: by 2002:a17:902:c20c:b0:1e3:e246:2cd1 with SMTP id 12-20020a170902c20c00b001e3e2462cd1mr8977698pll.62.1714997745872; Mon, 06 May 2024 05:15:45 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q17-20020a170902f79100b001eb66b69306si8394640pln.627.2024.05.06.05.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 05:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=MY1Fro45; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-169770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D01E2869FA for ; Mon, 6 May 2024 12:06:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBCC7143890; Mon, 6 May 2024 12:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MY1Fro45" 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 75F4323D2; Mon, 6 May 2024 12:06:30 +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=1714997193; cv=none; b=DHCIHl+RdDAECf6gE6RFqf2TrCJM+BsAyVcjYnfL9/dNLvWHSAEMj7+jSeR62GcLACFvAEQ0qolU70v11YG18rgtX7pQQCLQ359QgpFWkuv32wOaduwL+R0yPBQGS6PB2WZt8+YOxG2bWWzix1+bFvMn2iFuN9iHOnTXdip3kVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714997193; c=relaxed/simple; bh=HA03VMTWx7hFRDjISikCd5rAe3inSqQv3U+JhT9BpIU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EkXH1yZstpfOr650WvxNmX/9oGWFEy8SJ4ZtjiW7JKEbm7ouDh5rNpz8/xNye8AQ67d+xCArt91nzimheWg1qLfs9H9KofDc4SRJLvxtaE190AZYXvCOJM78m5mQXzGt9PbmI3LTBxAWrrs8SyJtjPKBpxyjq5QTFAl5V1nCXSg= 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=MY1Fro45; 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 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a599a298990so464281366b.2; Mon, 06 May 2024 05:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714997189; x=1715601989; 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=0/7y05oOvga1AY6RWQLcXXp5qLqEnvKHODSbHeXVGyU=; b=MY1Fro45MT109KR8h4CFKw/UXXkT1iQTF42niuo58YBUxvMaDtRbKZZbMgfruxXmaY VvQzHECIrXViUiaTpi42n4jc0kL2xxMVRfXkXGIFztWRDeDitdt05zwgn8nZpucSxxSj RDOf09UhiTc7YjLfm0/WWDFHfwrxleA1Tztu6xxPdvVnJIfKusCIY2H0ptrwNC/7qR74 85trjinFv53Qgh+XjUiaE9k8uWtKhrdt8VxhgbgsA4e0LZ9oLVESS/1hoqSFcovdypEy 7k0YpIvI1wt6Wj5SFXC6IpHVngB2s/7woRmKs5JUXdqNGA39asX06lY4fQHmnlXZr61N Kzsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714997189; x=1715601989; 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=0/7y05oOvga1AY6RWQLcXXp5qLqEnvKHODSbHeXVGyU=; b=szvDHpeZqomSKcQ4X46OMpHSJEmMrpcmIs66g6YHO9ZlQkD9SVE0YOoq4xNT4I1gjj iePlqYxKKovEZWIn1Pv5kFlHLQN2/AAIaJhnCPZj2W7USMjz9v9t3UWFUfqpGowHF+Fk tIdPhTrcb2/z7uoBAxk1WZO3fPdFqG4xifKcwEGxdV/DsD36+2nt4yuw/AEbLtdvJb6T uOlLeDnIttSnMXCVEk+f5ptInLQ+ZAWCm2l0BXqWeol4Pc9TAUT7kZ55FRZAttj2iMBC uIjqVETm70P2pU8jfmJFmAmrcsvzET2Ce49AC1fFKVYgspOojWqBSgVld4NIlUP2b2Jf Oejw== X-Forwarded-Encrypted: i=1; AJvYcCVq2lwU8X1t4JWJm9jpu+M2OS9DAcw5ZroIELUKNJsEo22QFTn7ux5cRn1LFPpvZou0g+evYSDOnq0sEyFyyDeQpwStVcQCZPpycRBjA35UxRueFPfzF7jRPr5rDD2zyhakQpD9ztd3TvnOJcK1S5T5gEtUJijMdfRjPME6bM8sI+g4Wb69 X-Gm-Message-State: AOJu0YzwC9aZUxpbXXpwPyl7uYTMsQQCdjARpTisBOMMTx4niWF4z5X1 1F3r8SiUbGkHtVUhiP5ufYC9U+606CkaZUJ70TKXLlIzma+LFChh96tylJTqDkjM9Mm6Mt9wlhn 1uEhNjMy8reVgOdsv2FRrZAogzXQ= X-Received: by 2002:a17:906:5482:b0:a55:a072:1ab8 with SMTP id r2-20020a170906548200b00a55a0721ab8mr6220034ejo.27.1714997188685; Mon, 06 May 2024 05:06:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240505214754.891700-1-andreas@kemnade.info> <20240505214754.891700-4-andreas@kemnade.info> In-Reply-To: <20240505214754.891700-4-andreas@kemnade.info> From: Andy Shevchenko Date: Mon, 6 May 2024 15:05:52 +0300 Message-ID: Subject: Re: [PATCH v2 3/3] Input: ektf2127 - add ektf2232 support To: Andreas Kemnade Cc: dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, u.kleine-koenig@pengutronix.de, hdegoede@redhat.com, siebren.vroegindeweij@hotmail.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 6, 2024 at 12:48=E2=80=AFAM Andreas Kemnade wrote: > > The chip is similar, but has status bits at different positions, > so use the correct bits. .. > @@ -46,6 +47,11 @@ struct ektf2127_ts { > struct input_dev *input; > struct gpio_desc *power_gpios; > struct touchscreen_properties prop; > + int status_shift; > +}; > + > +struct ektf2127_i2c_chip_data { > + int status_shift; > }; > > static void ektf2127_parse_coordinates(const u8 *buf, unsigned int touch= _count, I'm wondering if you are using --histogram diff algo when preparing the pat= ches. .. > + chip_data =3D device_get_match_data(&client->dev); > + if (!chip_data) > + chip_data =3D (const struct ektf2127_i2c_chip_data *)id->= driver_data; > + if (!chip_data) { > + dev_err(&client->dev, "missing chip data\n"); > + return -EINVAL; First of all, there is a special combined API for this, please use it instead. Second, use dev_err_probe(). > + } .. > #ifdef CONFIG_OF Side note: Ideally we should kill this ugliness. But it can be done later o= n. -- With Best Regards, Andy Shevchenko