From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932585AbcFTRX2 (ORCPT ); Mon, 20 Jun 2016 13:23:28 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:48968 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754281AbcFTRWb (ORCPT ); Mon, 20 Jun 2016 13:22:31 -0400 From: Vivien Didelot To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn , Florian Fainelli , Ben Dooks , Sergei Shtylyov , Vivien Didelot Subject: [PATCH v5 net-next v5 00/14] net: dsa: mv88e6xxx: probe compatible Date: Mon, 20 Jun 2016 13:13:57 -0400 Message-Id: <20160620171411.13746-1-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.9.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset factorizes the legacy and new SMI probing and abstracts the switch register accesses. This simplifies adding support for new chips or alternative register accesses. This will allow us to use a compatible chip info to describe how to access the SMI device and its switch ID register at probe time. For the legacy probe, we fix the compatible info to 88E6085. For the MDIO probe, we will use the compatible info from the device node data. All patches are reviewed. Changes since v4: - fix debug printing (was 'val' instead of '*val') Changes since v3 [3]: - better register access abstraction using the chip structure Changes since v2 [2]: - do not guess compatible model in legacy probe - add low level SMI API using a chip structure - allocate before probe and detection - add 3 cosmetic patches Changes since v1 [1]: - merge style fix from Ben Dooks - add Acked-by/Reviewed-by tags - drop one compatible string per model - detect the SMI device based on the compatible info - add an SMI ops structure [1] https://lkml.org/lkml/2016/6/8/1201 [2] https://lkml.org/lkml/2016/6/14/671 [3] https://lkml.org/lkml/2016/6/17/995 Vivien Didelot (14): net: dsa: mv88e6xxx: fix style issues net: dsa: mv88e6xxx: remove redundant assignments net: dsa: mv88e6xxx: use already declared variables net: dsa: mv88e6xxx: do not increment bus refcount net: dsa: mv88e6xxx: add switch register helpers net: dsa: mv88e6xxx: use gpio get optional variant net: dsa: mv88e6xxx: remove table args in info lookup net: dsa: mv88e6xxx: rename smi_mutex to reg_lock net: dsa: mv88e6xxx: add chip allocation helper net: dsa: mv88e6xxx: add SMI init helper net: dsa: mv88e6xxx: add detection helper net: dsa: mv88e6xxx: pass compatible info net: dsa: mv88e6xxx: add port base address to info net: dsa: mv88e6xxx: abstract switch registers accesses drivers/net/dsa/mv88e6xxx.c | 567 ++++++++++++++++++++++++++++---------------- drivers/net/dsa/mv88e6xxx.h | 34 ++- 2 files changed, 385 insertions(+), 216 deletions(-) -- 2.9.0