From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CBD9ECAAD5 for ; Mon, 29 Aug 2022 19:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229565AbiH2TXL (ORCPT ); Mon, 29 Aug 2022 15:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbiH2TXJ (ORCPT ); Mon, 29 Aug 2022 15:23:09 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85B2587094; Mon, 29 Aug 2022 12:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661800988; x=1693336988; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Eq6QU+bV4AEJdkrAkD7NtxB2iucXOSQ9z1L/6a5MV/8=; b=dWzPdzMr2IQbc9+RANW8VHOOrkJzMCKWor6c/oeMKmYN6tfVl88F3nKB MGAAUXqhbfpc/M7sknf/+rimOhk2vVUQyy4kwxfHEdzSHpIhzMejWyAs0 kOGEMy3QZWYelbLwGHxhMMXJTInYioGh1uOj6ie9Nrf3IKMW8k5hbKXIC xA0NOKILZgLieZ1gHHZ2sgMDxfUZNVKJnJ0i471JYl6+6Vh7GnB4G0Xjh vdGJPHphrJ5THl3RFNzaZhq/RJr5qHGWnCn3ze5DEUp4AWaSfL111s/Kh TVHvR4QXudHdXvg++aV9VyVvUuMrk0TtSgxE6Q6iccfwEoZIOpkubw9m4 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="381278641" X-IronPort-AV: E=Sophos;i="5.93,273,1654585200"; d="scan'208";a="381278641" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 12:23:07 -0700 X-IronPort-AV: E=Sophos;i="5.93,273,1654585200"; d="scan'208";a="753743366" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 12:23:05 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oSkLe-005emK-3C; Mon, 29 Aug 2022 22:23:02 +0300 Date: Mon, 29 Aug 2022 22:23:02 +0300 From: Andy Shevchenko To: Jonathan Cameron Cc: Jonathan Cameron , Linus Walleij , Jakob Hauser , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v1 1/4] iio: magnetometer: yamaha-yas530: Use pointers as driver data Message-ID: References: <20220829112407.74917-1-andriy.shevchenko@linux.intel.com> <20220829180022.18dac46a@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220829180022.18dac46a@jic23-huawei> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, Aug 29, 2022 at 06:00:22PM +0100, Jonathan Cameron wrote: > On Mon, 29 Aug 2022 14:24:04 +0300 > Andy Shevchenko wrote: ... > > - yas5xx->chip_info = &yas5xx_chip_info_tbl[id->driver_data]; > > - ci = yas5xx->chip_info; > > + ci = device_get_match_data(dev); > > + yas5xx->chip_info = ci; > > Am I missing a path by which device_get_match_data() can use the i2c_device_id values? > I'd expect to see a fallback to that if ci == NULL to cover the non firmware causes > of probe(). I've seen a few patches without that fallback path recently so wondering > if some magic has gotten hooked up and I've missed it (something to push that via > a swnode perhaps?) No, there is no such magic behind. The idea is that we use DT / ACPI overlays when device needs to be established. But I have got your point. -- With Best Regards, Andy Shevchenko