Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4075964imm; Mon, 11 Jun 2018 06:40:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7XQPGFGLVhZxoXOQ64jUAkR4wBbfvL3mvruX2SG7RoD1ixIOawQPNWVHP9Tw9luWYZI4w X-Received: by 2002:a62:3e9a:: with SMTP id y26-v6mr17543471pfj.98.1528724407289; Mon, 11 Jun 2018 06:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528724407; cv=none; d=google.com; s=arc-20160816; b=BhLd07F09H6H3vBhL14D4Gp3m2mMeTQej8Q2GYVyh3m4MASRpPDnQINZEZwZ3EEY8g qD2VQ97+yglwYRPCqwA2N6FwSGNCbsgkfdammGGFsMJijlHDzVt3PYhov6/fdwgKT7sc hdue6DaweiI/skL4pWddjcwI9GA+ub1k/oa7QtDyxc6PUeHyyhkYZm9QHDnyGVdw+Z0i 1/iNr3WaWzEhCPvMi8+jubPJpWOqBf3W70vrq7hLsnUtURZtZOTDSinVj3q7DtMKeKOn +ATezjFwWY/OLVTNqoJneA7BwOP5BIkVsopC2N5EJoYq/zWdHArlqWlWE39vyiu2fTUJ MX4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=xiumxwUlXYJaSGC1yKb5385gszpdTJotOx3mhNAX7Go=; b=HeGUmgO+iFF2ie7IUCID3FM/Z3GKoxnsTRWkKOcCJfETI8s968GOc7e33ogo5Fjrr+ +2GmhbhZSP9h0qR51BHNVenqmuHZNKqp7Do+nFgG/baZqf+38hLlnhMXZf34RMCTC3Dh IiOrnLx2kvcep8x3TLfXsADFOmzjMbepXG7fHoH9+ziwmt17x37TYZMKxLzTE/YM5r8S sWC5MkkIbvYrbod+J25SZ9dBQdcubbiEgp9AY9Pos+WbSC3r1tFyq4nzXqI8aeyQI3kF r+IRTcZX1j64LeW49ZTiGtM+TfkBVlgPqyNle1JgYky4Q3GMzIqiFrqpgWnWHpywREUD peAQ== 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 s136-v6si25532679pfc.222.2018.06.11.06.39.53; Mon, 11 Jun 2018 06:40:07 -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 S933240AbeFKNiU convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Jun 2018 09:38:20 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:54303 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932917AbeFKNiS (ORCPT ); Mon, 11 Jun 2018 09:38:18 -0400 Received: from marcel-macpro.fritz.box (p5B3D24B5.dip0.t-ipconnect.de [91.61.36.181]) by mail.holtmann.org (Postfix) with ESMTPSA id 3E16ACF185; Mon, 11 Jun 2018 15:44:59 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: [PATCH v2 21/24] rave-sp: Support for variants on modalias drivers From: Marcel Holtmann In-Reply-To: Date: Mon, 11 Jun 2018 15:38:16 +0200 Cc: Ricardo Ribalda Delgado , Linux Kernel Mailing List , "open list:SERIAL DRIVERS" , Lee Jones , Rob Herring , Johan Hovold Content-Transfer-Encoding: 8BIT Message-Id: <8912BE88-4AA3-44ED-9828-57666CB31522@holtmann.org> References: <20180611115240.32606-1-ricardo.ribalda@gmail.com> <20180611115240.32606-22-ricardo.ribalda@gmail.com> To: Andy Shevchenko X-Mailer: Apple Mail (2.3445.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, >> Rave-sp behaves differently based on the device variant. > > >> sp->variant = of_device_get_match_data(dev); >> + if (!sp->variant) { >> + id = serdev_match_id(rave_sp_serdev_id, serdev); > > I think you may leave the ID table where it is in the code and use link. > >> + if (id) >> + sp->variant = (const struct rave_sp_variant *) >> + id->driver_data; >> + } > > Perhaps a helper like it's done for ACPI / OF cases? > > [device_get_match_data() -> ] > of_fwnode_device_get_match_data() > acpi_fwnode_device_get_match_data() something like that and frankly this is trying to hard. This driver is currently really DT specific and can be fixed up later. It is causing a lot of noise in this patch series. I would really urge to focus on the core changes get prominent drivers support. I think hci_bcm.c is a good example since a) we need to fix up Edison and b) new ACPI based tablets might be able to allow for easy testing. Regards Marcel