Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp820992imm; Wed, 4 Jul 2018 06:36:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpectJo7RejgmvG4fJdcj0+9moJj4b7KW7l0H76wGOBsWEYoMWh8LdlsOgo3QAwZLGfLAQ4g X-Received: by 2002:a63:d8:: with SMTP id 207-v6mr1900768pga.94.1530711386368; Wed, 04 Jul 2018 06:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530711386; cv=none; d=google.com; s=arc-20160816; b=hc8/wk6932FNM4tlGmwyxqRhmXuvnxe9TABKIgfwKRD6Ztur86kyfzyQH4P9OmgmaV aMcWuV6viO5xeDoeMyrr05o+AEwLBkqzApHWjbMrDgefVamE4v6lmQzJR0exAZy5myRA j1Inf69xMF5uR4UpIND9MXBzjlz4gVYwx/xyjnUZm1aV+AZ1H7Rnr4ft719MnTrdUHPv AamV23Zs+a/Llm5+vkoQA1fHvgF7lWQRXA8zE84rQJGbOfb8/5ICXUGfMeYlmiBPL4zC fSp6Hn8pvvdVnzPqWb1btpkdwWV40XcF+vDEbympzDxeWMNeYlY143WXshHAktFLcfqE 5pXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:date:from:message-id :arc-authentication-results; bh=gO5yubj6d/WG009kjP/YocIJVxzzr/nIfn+CknwI+X8=; b=uYy1I5LfckTpekP6hULMqsfCkWnYwYPE9SWtnxbvAS14OVqLe92V39vuYGGajRCvPa 60MwB7f/qBSbH4H1688gdSV5JKg0MT/3h1kyacJlC0VluiV61TI6oSod36W0+HZzyJSs gWbn5ToyIQfNliprr3juIcJYf1E+5GwGF9Ouhw7IejbT6dVrIy3m9cXrih52XFbM9lCT ElXdFp/DOTTx9FjdpD946X8nhb2NTCG/PcpdftXKZeeQqoGyLZXRE3EMJbn5Vhgyyj2e r+Gw9ARyATTVLsGDj2hv65XMOfnjX+d9yhW+/02W957+g5YOvk7LyD0hZOHLZqlEAjFT 4WaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si3594612plb.331.2018.07.04.06.36.11; Wed, 04 Jul 2018 06:36:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbeGDNfU (ORCPT + 99 others); Wed, 4 Jul 2018 09:35:20 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:45684 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753105AbeGDNfR (ORCPT ); Wed, 4 Jul 2018 09:35:17 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 591BC4314C; Wed, 4 Jul 2018 15:35:13 +0200 (CEST) Message-Id: From: Nikolaus Voss Date: Wed, 4 Jul 2018 15:27:06 +0200 Subject: [PATCH v3 0/2] IIO: st_sensors_i2c: improve device enumeration To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang , Javier Martinez Canillas Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When trying to instantiate a st_accel_i2c device from an ACPI based system, I ran into some problems: For my device, there is no ACPI match table entry, so rather than creating /allocating a new ACPI HID for the device, I wanted to use an existing DT table compatible entry via creating an ACPI_DT_NAMESPACE_HID /PRP0001 HID ACPI entry (see Documentation/acpi/enumeration.txt). This did not work because st_accel_i2c.c bails out if there is a ACPI node but no ACPI table match. Use device_get_match_data API to get the right driver data. acpi_device_get_match_data() currently doesn't return DT compatible matches. A separate patch is submitted to fix this. v3: - remove unused i2c_device_id .driver_data fields as suggested by Javier Martinez Canillas. v2: - use device_get_match_data API as suggested by Andy Shevchenko - removed syncing DT/I2C table names as Jonathan Cameron pointed out this would be an ABI change - converting from probe() to probe_new() is moved into a separate patch (as suggested by Jonathan Cameron) Nikolaus Voss (2): IIO: st_accel_i2c.c: Simplify access to driver data IIO: st_accel_i2c.c: Use probe_new() instead of probe() drivers/iio/accel/st_accel_i2c.c | 61 ++++++++++++++------------------ 1 file changed, 26 insertions(+), 35 deletions(-) -- 2.17.1