Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3505314ybk; Tue, 19 May 2020 06:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDq/rXkLz2Ws0ew5SYrfdVsdFdHfXJg1UutdIFlqgcD6ohY++RRW+Dj5P95iUpFvVK1zPm X-Received: by 2002:a17:906:7a1c:: with SMTP id d28mr18286762ejo.10.1589894593589; Tue, 19 May 2020 06:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589894593; cv=none; d=google.com; s=arc-20160816; b=FFShW3vuq8tja9laF1l+NZEmLEbAOKYA08WiEGfWZnCeC4X5nOYwAfjL7OTRcTQIf/ IYzxtrFV5lZ14sa+tUG8NJR5SyW/BKHoFxxDTmoLvZ6nRryVnEXKGEtePdFasYYYuIwe jrZTOp/PfZdlALSFpJM1dHGzVyAqHNs+aBfM9Sw2i2iX6H7t1H14Cde1M/bmhpK8afDn IW8z5XpMHwv7b8QPmx/wwPox26fnDgMsu9LkEPqzWEom7B10cHFPnGxmYSIO6fRYspSV YIWyhUN748LSVZN9hwU7eszXR0In3XcwMrnDc49/pCCMuuWelon/goCv6ZKJQCTWltGE iPiA== 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:message-id:date:from :in-reply-to:references:mime-version; bh=2PcosmUtjUGpDMloq3KC3HImwfJywut7khCkzSwSXL0=; b=cjCckWzE19avChDaAeeas39OyGrZUG5Hpvuv7XTu78Ohr9vKyEN3HtNGRL0SaAQxmE n/DSEVW42rUX5w53etTOM8SDPEPbmI1JaYyfRsdacsRL9eYtPADmdpZbm6oDyUyUyuVs R5LLsmNWRkS/OFhUvAbzJzlz0/aAUofeLnWWn71ZO/K2TFuItRUMC+AlboZ1AQJ+GQh2 s331xmBqaShp1xpzSTad/UBPek0nIW4VeBRjnnTQ/6UVry7s1800BAEDLSSwQxDS6Jf4 k6LlkNfazWag9p1kEsP1wxfSgq86Zj1wIB0w4SsB+bURVSMi0TyPxm9kWUaTots2eNIu UIDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si112001ejb.633.2020.05.19.06.22.49; Tue, 19 May 2020 06:23:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728845AbgESNTM (ORCPT + 99 others); Tue, 19 May 2020 09:19:12 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:40189 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbgESNTL (ORCPT ); Tue, 19 May 2020 09:19:11 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MbAYi-1j3tBe1AYi-00bfUo for ; Tue, 19 May 2020 15:19:10 +0200 Received: by mail-qv1-f52.google.com with SMTP id v15so6423321qvr.8 for ; Tue, 19 May 2020 06:19:10 -0700 (PDT) X-Gm-Message-State: AOAM530zjBq/KmuOaW+0qaDR/kp7JTGhAe714GbmUpXNcvmPxzqCQrbn lNtmu2sebzRemwhPxjxQ8CkZel0I2sLIVJs6Q5w= X-Received: by 2002:a05:6214:905:: with SMTP id dj5mr21157587qvb.222.1589894349208; Tue, 19 May 2020 06:19:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Tue, 19 May 2020 15:18:52 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/2] mfd: syscon: Support physical regmap bus To: Baolin Wang Cc: Lee Jones , Mark Brown , Orson Zhai , Lyra Zhang , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:MKVmt9Nk6FuJhdmIo5owxyQ2BwHyi4hfUcrGfQYDEsrVstz+2uH l7jrC5EFW6qNpas4hQjfdUDbT9vY1tqYR/fvyFAXlapaS4xtJMUtYn99kTzj9YUs4JLG9dh /4fuboBblmF8X+TwBf1Q6t7dVAIysK+kZGKTPrq2v/dwvLIiC+901yibwX98egXcYoEJAbk KlrEEAldUzQGUsGj2gmnA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gOLRx7FBe8o=:Hn2Xc6MnYLmB6R/47eE4rT PRu7Wk3J6xQj9lnclCZFlIl8Z5BWEOMdlOXOx3a+ZalvrnO2J9uDA5xTsFuxacQmfH4JvL/D2 eF7BU6oowy+99n5/f9PSk9hsVhhm5GXrE7Q1yKYSlFkRB/Xsn4HYYIUc9KKhyAL4iFZqilo+e Mpm9E/o6T+RnSZcuf7VsrHC0PVlwLicIPUMqiiKoO8oEv11YfekcS2kHn/+zBHXYwI1HYqLlb XOcBLah+pK2kKi6jScGAhScX1b/KHAKUqGDgnvQlr7KQEbodVZo+H0+BipKHsXm7vhq92gb9s gtkk29k5pfyzN4vTzD+Knk2MZ6B9x+SwfpWB7iXOmisE+epvxsKreqrD+9PgTBQ0MkM6yrcYJ Sb0egCH8whQmEjKc2FDd/mrXnyw88mQir8Q6fQytUkEnyPVWoL+cU/rQC/hvCW8SQFI+5taYe axNN4ACCw/ctoXDddVKoVEo0OgCtp2cFi/WTxWmygcJEdzZ/lE2Ge7MhIew2GmlndkdU7R5fR tsCrtjAGBGzi/LWcXLyBSDVfKm4/NIRxpqcJW82a1xrAOCLRSHegPjjQWrFfj0FvwbghxBJ8A 62zbnXJ0AogRr+ZbAg8gxOBlfPh+gG5873MnQk9PRS4O9RBpC/Xz/q8QjM+W/7aGK6Pnx7xzH oE2bKeyWp/Vjb0HSGa7RvMzQU8GMBJ1TTn3RoiEZ3BWDLFZsVf1/2M09hS4esrq4AMqiTqqqx u2jGdzeCqEU446N4JCKlpHu13VgrXUEHG/9dYJonnh1JOpet/tZWSzs0qV32yNH1TKXt9d8FZ hbLPOA96BcoDsjnAEzdagOZAe5LDo9B+S34oe6nOg5Zl9gqhww= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 16, 2020 at 12:13 PM Baolin Wang wrote: > > Some platforms such as Spreadtrum platform, define a special method to > update bits of the registers instead of reading and writing, which means > we should use a physical regmap bus to define the reg_update_bits() > operation instead of the MMIO regmap bus. > > Thus add a a __weak function for the syscon driver to allow to register > a physical regmap bus to support this new requirement. > > }; > > +struct regmap * __weak syscon_regmap_init(struct device_node *np, > + void __iomem *base, > + struct regmap_config *syscon_config) > +{ > + return regmap_init_mmio(NULL, base, syscon_config); > +} > + Sorry, I don't think the __weak function is going to help here. I'm not sure whether it actually does what you want when both syscon and sprd_syscon are loadable modules (I would guess not), but it clearly won't work when syscon is built-in and sprd_syscon is a module, and even if the module loader knows how to resolve __weak symbols, I would not want to rely on module load ordering to make it behave the right way. Arnd