From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 97BAF35E527 for ; Mon, 2 Feb 2026 11:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770030255; cv=none; b=WYmkafOGq4LRJ51cHdBBTEbhKOfNGk8rlptm73Zk2jH0JmJVh2fhN6rLw8cM5d0R0RNo+Gi/cocD6K5jeygHwRqq0FyUyB/PBhKwYbDcNFSvz9LmjijC8m6gslG8auFrRdpd0KVexBur+DHsVsOufrdsmBdIPwxaABOcAfa4j2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770030255; c=relaxed/simple; bh=Loys3V60w4/i089Z65xNUXkI9S+P9TwJDpkBw4scIF8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XeDkpK7oAEtYmfPS05+oCKEucwisQKeOYr/2JhKC2fB3IdBD+vtmTyj+/6s9dUi4DJ2gxAEV/E95I7OhbWloKIfODzd+pbdYDWNAniLYg6AX1hkZc7VqJjkiTUUnttm/8CYhAJXVGDyQiM2zfBqi9mOKtVuDZvcEcnxLh1tw3NI= 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=ncC1Dr6k; arc=none smtp.client-ip=74.125.82.182 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="ncC1Dr6k" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-2b72e49776eso7983842eec.1 for ; Mon, 02 Feb 2026 03:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770030253; x=1770635053; 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=XpnvG6a+X8idDiHgSW6vo1XR9f+nMb7ZNZHPlBThMwg=; b=ncC1Dr6kZdAZXOJFQGyUyj8n19L42Nfze2MUVNAwlVnCcpJXzQ9EkkbxOkxzbG7jcX oshktc2x1UuniOOMt1O2ScGJOeq0z+YYfmbsfkWvQYvcMzybhHbYUXcX1bpaAtdf611l hae1guQ09kLAV8BRnVbhahMJwNHU777HrjLNjGBzq9g8K7k6wawVOE9+r37rkxcHWgE0 TYRQvBLa6McGqUEP8bp20Icgk3QH1Xf091CSZ6g3aQllRfKstCaFhBfaymDcrrHQrlVf 3+2ck2qLMx0JUtwrqWWO8NZ1D4BS4f+KFT7+iKh+Te9OSGdJegypDN5uMb2DXT2YwbFL 46jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770030253; x=1770635053; 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=XpnvG6a+X8idDiHgSW6vo1XR9f+nMb7ZNZHPlBThMwg=; b=bazzl1+TCZxGWZwj3on9CQBOaWFJgow2Jo63ytRJbXNTl+Vy6TpxwdZL2rFcOkjmcV J2XI6m3lGhxGYAb2Tv5ynENQHReVkZ8OIam+yxqq3AnL8in573fynrsasP5ol2FQVpwt YRjFfHAZOv3VVrWL9LBk7rjLTCXEW5pFTv5NdzcT9qzMC/T/RgTPdLmW4F8m2KsWf+Kn c13fXqa/kBA+0u09Zj8x0uDyg3RPzKpXS4VBkoBz7tvK8QmxF+yyusxf+C+Y6l1AEAyV WB4smPVbaLIe/ksd0u3txRx0hNIEbr1vnts5dyUdza+HIltio13saQZsEJD/FUAm7Rb6 0Agw== X-Forwarded-Encrypted: i=1; AJvYcCWhzlW4eNNpJ/alJyvHgDKNn4g1u/NIIc40tPDBY4Isi7Ih1HfTGj7/2Vko/xhWHXGlHeKgXbp45Cfqa+I=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9lBjPRAY2IGFM7/x+89hG8vg5R2UXUZ6231aof8FoKIJ15kE1 SeS19A5edV+o/JCF4/zQMeQ40fEFCQ96LnC/Z/O4oPJBlMOPBGvkPqZ/sXdZn16B+qU= X-Gm-Gg: AZuq6aLXlYvdg+qvSCxkDCBGS8ksSoPisIQLUX/aLgDHuTO0uAoyQ5JSz/QvzkZn2DM LBs5wAJGKWGMz1YS9ZRlNvsFvGMs7RvMrM9QLAvFiiY6GjRoXWAzMp/QuvQhThfMw2sp9Ro0I9Y uAUvqgd0fE/MbcSsxNyetRzZuQ5BwagBzq+NT6XRxU1cI60Lrdv0/WpUEdlusm1OtiSAZPwoFsm bpQxU75UnHjpN9nbtAdoO+k/+4050Hvb7jODIcLCAz8SJSOB88nFpLMHI8qAOAZLCcb+i5QBcfi p68wT1KR2qmYi3RxyDHnG/SqUGVGNfEsVzx+0R9BLuygqIV4DzpXkh6/YZ4hS+6YvTApMTo5/RC qMIJT2fmKGkEHhIbFSBbmUfH6IvOveSX+xAzsbuYLPH9Xzgj1+aki+v9Ixi0iTOSXg9R9CcC8ZT S/UqF0gEoCfmptCOCEsq7Zj7l/9aTO7Ed6h0HnJ9fXd1pDav9Jh6yeJXLrW9+1r4c= X-Received: by 2002:a05:7301:2f99:b0:2b7:c5d7:84bf with SMTP id 5a478bee46e88-2b7c86756ccmr5986307eec.19.1770030251139; Mon, 02 Feb 2026 03:04:11 -0800 (PST) Received: from google.com ([2a00:79e0:2ebe:8:2956:5cef:ff00:c68d]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b7a1add4c2sm19657728eec.27.2026.02.02.03.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 03:04:10 -0800 (PST) Date: Mon, 2 Feb 2026 03:04:07 -0800 From: Dmitry Torokhov To: Konrad Dybcio Cc: Luca Weiss , Griffin Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 2/3] Input: aw86938 - add driver for Awinic AW86938 Message-ID: References: <20260128-aw86938-driver-v2-0-b51ee086aaf5@fairphone.com> <20260128-aw86938-driver-v2-2-b51ee086aaf5@fairphone.com> <472d7db3-db34-4966-aa17-588e1153ba12@oss.qualcomm.com> <34fa533c-b9ab-4025-b9ad-4041837e790c@oss.qualcomm.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: <34fa533c-b9ab-4025-b9ad-4041837e790c@oss.qualcomm.com> On Mon, Feb 02, 2026 at 11:19:36AM +0100, Konrad Dybcio wrote: > On 2/2/26 11:14 AM, Luca Weiss wrote: > > Hi Konrad, > > > > On Mon Feb 2, 2026 at 11:12 AM CET, Konrad Dybcio wrote: > >> On 2/1/26 2:49 AM, Dmitry Torokhov wrote: > >>> Hi Griffin, > >>> > >>> On Wed, Jan 28, 2026 at 04:51:14PM +0100, Griffin Kroah-Hartman wrote: > >>>> @@ -717,9 +746,19 @@ static int aw86927_detect(struct aw86927_data *haptics) > >>>> > >>>> chip_id = be16_to_cpu(read_buf); > >>>> > >>>> - if (chip_id != AW86927_CHIPID) { > >>>> - dev_err(haptics->dev, "Unexpected CHIPID value 0x%x\n", chip_id); > >>>> - return -ENODEV; > >>>> + switch (haptics->model) { > >>>> + case AW86927: > >>>> + if (chip_id != AW86927_CHIPID) { > >>>> + dev_err(haptics->dev, "Unexpected CHIPID value 0x%x\n", chip_id); > >>>> + return -ENODEV; > >>>> + } > >>> > >>> If we are able to query chip ID why do we need to have separate > >>> compatibles? I would define chip data structure with differences between > >>> variants and assign and use it instead of having separate compatible. > >> > >> dt-bindings guidelines explicitly call for this, a chipid comparison > >> then works as a safety net > > > > Are you saying, that > > > > 1. we should enforce dt-bindings == CHIP_ID (what's currently done) > > This No. If there is a compatible chip with different ID (for whatever reason - maybe there is additional functionality that either board does not need or the driver does not implement) we absolutely should not refuse to bind the driver. Hint: this thing is called _compatible_ for a reason. > > > > > or > > > > 2. we should have both compatibles with no handling based on compatible, > > but only use CHIP_ID at runtime to change behavior > > This is spaghetti I really do not understand the aversion of DT maintainers to generic compatibles. We see this in I2C HID where we keep adding compatibles for what could be described via device properties. Thanks. -- Dmitry