From patchwork Fri May 25 13:50:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 136895 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3619466lji; Fri, 25 May 2018 06:53:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqiG2al8nF9lu3Khe2BsUDRunoR84P7VPlEo7uZ5B0MhpSJNpCh2y3tVwQf+sRjunRUJegW X-Received: by 2002:a17:902:8f97:: with SMTP id z23-v6mr2755735plo.329.1527256393950; Fri, 25 May 2018 06:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527256393; cv=none; d=google.com; s=arc-20160816; b=t/R1czAUzgd8sUjPfKMrR0S11riSmEYWqYxZ4qSPkosoVxH7goQSkLR1G/7uocrzBg 40Cr+lg7hA1mjc4KXfPaM1saTcj/m/TcaIjo5nLMuXwuRUP5iqOdPOPOKBNj24BYqTEG SObsALBj3Eu1MRB76zOQ1RhCTBc7O29boJ78Zj+A7jz4I91BIT2naGgnY3IC2mviDTv8 KAR8Sm6WE2C6lmJzQS+yNZjgRb+mtEY94fic9dxNV7d5Aj6LIwnLIiqYPz7W3Ri/TvPY DOFAgkNM0LnS7dr0CACK12ql4ndDA4eWpccRBYTtxaomVfYx+UfB+ecHv/rouahkNxzL sIeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0psm2KuyehHJbeO1XQS0otT9TzI57kK/3Au/9NUPYH8=; b=BhBCRQKgS4bWXJK0Z4wxD0lK5omn4RjaKlU/JLfhLIwKHDudA/fZY5CqLV2Llz/5Vi 30FwhmwLKjeiNKsSa038LS9Dwu9D7qYbjSfr59cXy5qk6TMtcOJiz3OyxofR187T/Oon i9SZq7YakaPE+z+wIUz1cK+stsKT/iBk1MlJL0OfGIIxP6H/dOsts5uKGLSFMmZbXUkM tAknSk/mhsRt3Xk0dLD6YLTZVliyTpw8dzfCxbS+VPoPOHJNF7gprZzKO2fMiRaiNk0E 1IarA+nJOthYlSIelkJ2yDmVGXMnN5onKbAGJs/fhyAe12gPgwI774LVjSV1i67cRvjq GHsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S2Y0ahM+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i65-v6si24347341pfb.343.2018.05.25.06.53.13; Fri, 25 May 2018 06:53:13 -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; dkim=pass header.i=@linaro.org header.s=google header.b=S2Y0ahM+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964964AbeEYNxL (ORCPT + 30 others); Fri, 25 May 2018 09:53:11 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:37871 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935972AbeEYNwo (ORCPT ); Fri, 25 May 2018 09:52:44 -0400 Received: by mail-wm0-f65.google.com with SMTP id l1-v6so14877530wmb.2 for ; Fri, 25 May 2018 06:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0psm2KuyehHJbeO1XQS0otT9TzI57kK/3Au/9NUPYH8=; b=S2Y0ahM+BN2mCyH2SWPXVixqKM/vA7Xn4kDCud1pDWuYwRAivQcTqGeZ6MTmubVVbD 7moAuwEP+hhPnI7InURY3L6nFoCTJgAzppzPVFBH/fRVspBPmF8CqmtWfq6VOUmA+oDB sUmMi8YM1Oqwg5nAIDRvRSOjVJrAoYDIzn62Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0psm2KuyehHJbeO1XQS0otT9TzI57kK/3Au/9NUPYH8=; b=UAzlDnx3ZxSYZVMOW1DLEbLKtNBExgnKPznZZnubUmPpsh8H/8W7OMky+Qw/G6HZG8 dXJukRqePbliGTviUUjXe7tLvVDr3CBAp1ixujc8kkn8LW7uzpIdFdQfkw+eaUcdyIJu RaIj0MOB+OPC2am+4jg1r4p8SOdoX+GoBaaCKmCUXJ6ACYXJzcPTFKk6/msi5Vl57Zec sZ4HFt7ka8OrmTksPOycSF12PV7gE8AcEKVkUBYa0ZDEeo6WpU9MOtANpcxelX0tOvsg zZUlIUu+asiAojk1efy6h87r3qn4vDJukpvRM1q8lLAU951KdYI9vcYnzIrxFEh0ZM58 UmWA== X-Gm-Message-State: ALKqPwfySSWbCI3CzIDOcRUsHyak2DXNt/U3PIdhOWaO3dbCA6U4iGbr NvgCxEGoWL8ByeRj+03hBUM1Dg== X-Received: by 2002:a1c:f714:: with SMTP id v20-v6mr2076516wmh.73.1527256363090; Fri, 25 May 2018 06:52:43 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id q7-v6sm16484467wrf.0.2018.05.25.06.52.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 May 2018 06:52:42 -0700 (PDT) From: Srinivas Kandagatla To: Mark Brown Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/2] regmap: add missing prototype for devm_init_slimbus Date: Fri, 25 May 2018 14:50:36 +0100 Message-Id: <20180525135037.30638-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180525135037.30638-1-srinivas.kandagatla@linaro.org> References: <20180525135037.30638-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For some reason the devm variant of slimbus init is not added into the header eventhough this __devm_regmap_init_slimbus() is an exported function. This patch adds this. This also fixes below warning in regmap-slimbus.c regmap-slimbus.c:65:15: warning: symbol '__devm_regmap_init_slimbus' was not declared. Should it be static? regmap-slimbus.c:65:16: warning: no previous prototype for '__devm_regmap_init_slimbus' [-Wmissing-prototypes] Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support") Signed-off-by: Srinivas Kandagatla --- include/linux/regmap.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -- 2.16.2 diff --git a/include/linux/regmap.h b/include/linux/regmap.h index b6865f070464..4f38068ffb71 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -588,7 +588,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw, const struct regmap_config *config, struct lock_class_key *lock_key, const char *lock_name); - +struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus, + const struct regmap_config *config, + struct lock_class_key *lock_key, + const char *lock_name); /* * Wrapper for regmap_init macros to include a unique lockdep key and name * for each call. No-op if CONFIG_LOCKDEP is not set. @@ -907,6 +910,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \ sdw, config) +/** + * devm_regmap_init_slimbus() - Initialise managed register map + * + * @slimbus: Device that will be interacted with + * @config: Configuration for register map + * + * The return value will be an ERR_PTR() on error or a valid pointer + * to a struct regmap. The regmap will be automatically freed by the + * device management code. + */ +#define devm_regmap_init_slimbus(slimbus, config) \ + __regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \ + slimbus, config) int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk); void regmap_mmio_detach_clk(struct regmap *map); void regmap_exit(struct regmap *map); From patchwork Fri May 25 13:50:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 136894 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3619129lji; Fri, 25 May 2018 06:52:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6HWyTVE1JR8RjG6U+pgV4DVtxoCRpZYGPzs0XPjS5HTzeJ3q8QmRmoHFlgTEwhAKZn+xW X-Received: by 2002:a17:902:3381:: with SMTP id b1-v6mr2747568plc.248.1527256372721; Fri, 25 May 2018 06:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527256372; cv=none; d=google.com; s=arc-20160816; b=oCCrJRoira0KYauZnrsUNOzNmqZ2/1viC9tSRyz1TJJaTiRC+hTbfldI1M8+1zWeLy rS8ownHPLQ7WCWptl6ntDC8e3UcfJP+LwlbFJkG0FSM66xYMbqZkcubtrUChAcHV5F62 dk8+XT4Pxn/C1ot+GFmQVHmNFRKfqOm77lthiDYR9aCq87c9ewkGwe2JwBuPo1WEZrY5 IMLzUBVlYJ0Bq3EgAWBaGtDmclDJ9cUKk3Y2uygCFt7kuCOlgTSmENIy0xcAH2sUB96A SGlfAMa10PlnouULWY5uMsneyXwK4Qs5aOAP+HhXQ1MDxlMOEFFqdGx9+8/8wBrv41Y2 RF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ikVDo8FZ4Om/8lfz/jNgy6L7M3ZVOEMsqggTs7HhFRI=; b=uVasKY1sJx8GyTE4lCE+1hrHmvjXsdGSq6CYcPJuRxRhloFwd6kPZg3zOhN8hQmRMT A7Y6eMWr4WS4DMABY/P8PuZjnz3dyqTEbpZDWccEC6pld11UD33gaLS+fqY2zmke7GGw KPsEFvY9orNuv1D232ELGX78bXJWbVzFGJqAaoimmsk5vIP67eC9roDv7wUH3fUBS61C W7GRc4foXMb8J4cC2TmT3RVp4wfhteIiBx7cyVh/Qe0FJ3oAQLsuqyiQsSpkv+8NvDII 8eF/fmboNyFtxVSwLedf+A4+edwLYC9w+Bin7oDQNbh9JxxmPAJnn/D1tJx9is0QYOdJ 9wsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y3NqOXtd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17-v6si24255159pfg.227.2018.05.25.06.52.52; Fri, 25 May 2018 06:52:52 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Y3NqOXtd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936112AbeEYNwt (ORCPT + 30 others); Fri, 25 May 2018 09:52:49 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34517 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936015AbeEYNwp (ORCPT ); Fri, 25 May 2018 09:52:45 -0400 Received: by mail-wm0-f68.google.com with SMTP id q4-v6so13501310wmq.1 for ; Fri, 25 May 2018 06:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ikVDo8FZ4Om/8lfz/jNgy6L7M3ZVOEMsqggTs7HhFRI=; b=Y3NqOXtdahl2rL9UJa8YJiGncM2C2/ZsOkkob/3Vp+/er2ZJCwrW4gdYDKTUG4VmVW SqGnEOUIeYAeGGXDc7EI57Hoyt3N0X27gUqc+na6VCBBZ48FDmPRPTC8h6yb814FjeMF LKZaYAD9muFR77FfGZP68/72V4cWPg3u+I1uM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ikVDo8FZ4Om/8lfz/jNgy6L7M3ZVOEMsqggTs7HhFRI=; b=eALcslM9Oxi356CsB3vL22FUkzOoTk/VdAu42vas+FV/S4J7b2i/eKabzLjaAvFHBS v7ySpaakfpy2pH2OHLD6r1wdzAj8WO6U/u25PGc6urB2eLgWfNOda4K7w9Sma5d2AJyV Ty5yEie+rqzoxfoMfcPdxLDl1l8mZaEStzILLksvJCU0oXBtpDJ9iGiVgn8HKRqd96DT x3WWWGAaW3TYGEYsCKfBPopq0hG1rrwDQrZ2NvpNBYXfUsA30213wBwpcOv4TaqqQ6+L Cqj3mpTvZqY0glSvT4GncVCXNmHVbnZKQH6wV5dmSJ/8wmILWtXT2xjpyyfrXPabGpQ3 ESfA== X-Gm-Message-State: ALKqPwe7z2YJ2UCZEY2Vpq0h37huZ5+ua6aT4oD82fTc1chpCYnc4I3h c7TdmsNiHT2n9AuEmoeErNz9WXb5Rug= X-Received: by 2002:a1c:3c3:: with SMTP id 186-v6mr2126876wmd.140.1527256364190; Fri, 25 May 2018 06:52:44 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id q7-v6sm16484467wrf.0.2018.05.25.06.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 May 2018 06:52:43 -0700 (PDT) From: Srinivas Kandagatla To: Mark Brown Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/2] regmap: slimbus: allow register offsets up to 16 bits Date: Fri, 25 May 2018 14:50:37 +0100 Message-Id: <20180525135037.30638-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180525135037.30638-1-srinivas.kandagatla@linaro.org> References: <20180525135037.30638-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As per SLIMBus specs Value Elements and Information Elements address map ranges from 0x000 - 0xFFF. So allow register addresses up to 16 bits Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support") Signed-off-by: Srinivas Kandagatla --- drivers/base/regmap/regmap-slimbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.2 diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c index c90bee81d954..91d501eda8a9 100644 --- a/drivers/base/regmap/regmap-slimbus.c +++ b/drivers/base/regmap/regmap-slimbus.c @@ -41,7 +41,7 @@ static struct regmap_bus regmap_slimbus_bus = { static const struct regmap_bus *regmap_get_slimbus(struct slim_device *slim, const struct regmap_config *config) { - if (config->val_bits == 8 && config->reg_bits == 8) + if (config->val_bits == 8 && config->reg_bits == 16) return ®map_slimbus_bus; return ERR_PTR(-ENOTSUPP);