Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968096AbdD1ICI (ORCPT ); Fri, 28 Apr 2017 04:02:08 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:34788 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939540AbdD1IBz (ORCPT ); Fri, 28 Apr 2017 04:01:55 -0400 MIME-Version: 1.0 In-Reply-To: <1493198774-4478-3-git-send-email-sean.wang@mediatek.com> References: <1493198774-4478-1-git-send-email-sean.wang@mediatek.com> <1493198774-4478-3-git-send-email-sean.wang@mediatek.com> From: Linus Walleij Date: Fri, 28 Apr 2017 10:01:52 +0200 Message-ID: Subject: Re: [PATCH v2 02/30] pinctrl: mediatek: reuse pinctrl driver for mt7623 To: sean.wang@mediatek.com Cc: Rob Herring , Matthias Brugger , John Crispin , Mark Rutland , Russell King , "devicetree@vger.kernel.org" , "moderated list:ARM/Mediatek SoC support" , "linux-arm-kernel@lists.infradead.org" , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 28 On Wed, Apr 26, 2017 at 11:25 AM, wrote: > From: Sean Wang > > mt7623 pinctrl driver can be compatible with mt2701 one, > so the patch reuses the driver and deletes those redundant > ones. > > Cc: John Crispin > Signed-off-by: Sean Wang Partly correct. > "mediatek,mt6397-pinctrl", compatible with mt6397 pinctrl. > - "mediatek,mt7623-pinctrl", compatible with mt7623 pinctrl. NO don't do this. "compatible" means exactly this: this hardware is compatible with this driver. That is why we have it! So instead of mt7623 pretending to be mt2701, let the mt2701 driver list that it is compatible with mt7623, simple. So patch pinctrl-mt2701.c mt2701_pctrl_match[] instead. Yours, Linus Walleij