Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp34567ybl; Thu, 12 Dec 2019 13:33:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxSXJL92E4fwZtGTk66YJBBUoApyFBhpoLcuHdz0IhnDFhG5djz7HwMgjiBZxMAN9Re2zDO X-Received: by 2002:a05:6830:22e3:: with SMTP id t3mr10104827otc.193.1576186409377; Thu, 12 Dec 2019 13:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576186409; cv=none; d=google.com; s=arc-20160816; b=tCTlT0+Y3ZWoDA39mxDSpMfh+GVRc5aOfGimZU6F3qVR1eN+4mEgqtZq7US40mbqWs KVEYwVZqJlljL75pbbnvxrICkDlG2PlPLgj1Dej7nlsY7F+y3A+1HEUF19aqwFdAUdlN hi1JC5BRlqXAyq5jM90VBXKBCfmz6p/9UdyZgC7Znh87N+Q+qwqjwAo7eKGo2Nig+2Fn Rm5L6o1piZAooxg0uUqpXdrqkuiw7PY5/14PEg76q6wYT9eomRtKtc9LgADLVoZQ6SdT zFD3O13DyAK9Xqd/mBqLH2795DdN8IsSYfFTtzxob94onDLBZ5Xak+3JBRY8jcUGDPAc Id7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Ar3WGUfhwEDSSCq+9U1VZWrSE5XYUNVdZnayKnIhqMo=; b=o1fQo/mnn7TGx7OFZElTKt9UXMlJt00O7FPxW0jYtsa6JfH89FEop8zUviIRWylAU/ EUCfY3pT6Dr4SvyydLHMWzAWG5vJTxZ9F36PZOka77KrUrL5WnUU3uKWqY/BcfK9Ekhq QvKDVYcbqQ72KQlxo5lROPsMeMUoBrVqPDvH4BklPKiy3jcJuFkUi+5qO+pgzRjv0tnu kylKh6yzLqMsUfUQNbd0HWTNYdHCNSahyVEZo1+nyLUpnT9rJf1xiHMm+8G4GqyJ0HkH 4A0RPwmeU2BiDZJau8C5gskYEowMmczY3NFVP3zdMDEexdfLeyQKp1clBXgVnYgl6WQf H4Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tohT6lXB; 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 e17si3894943oti.89.2019.12.12.13.33.09; Thu, 12 Dec 2019 13:33:29 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tohT6lXB; 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 S1731107AbfLLVam (ORCPT + 99 others); Thu, 12 Dec 2019 16:30:42 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36877 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731067AbfLLVam (ORCPT ); Thu, 12 Dec 2019 16:30:42 -0500 Received: by mail-wr1-f65.google.com with SMTP id w15so4371285wru.4 for ; Thu, 12 Dec 2019 13:30:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Ar3WGUfhwEDSSCq+9U1VZWrSE5XYUNVdZnayKnIhqMo=; b=tohT6lXBhBc2QJ3oUJgFUSmQ7INkSx6FdEKCFGb0sJVtpqkXC+tujNgxj/fj2RPgvC /ojbALCKFzuioc5m2Oc5vymHLHGEc1677h4HuhZrW9jfDHZOVEJgtMRcb3dSSvjHnkvu cnn2i2s9LuMyaFISELlYzr70zXQ+oHotcglIWaf7KuMdUj0mikYSoHWHeQMZE0a4gs3E c8MHuf4nOcEzqckIyTI7p0PVThKQ0grDjWKV7smF3qVSELFnMMsW1jxkx9ZEbrlwcHMV GeV3IATLxC5H7dJ0BUR96f3PGXYDZ6dqb0OpaIxx7YWvLonmEEpd2alYGb1eqgcvn1CG As8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Ar3WGUfhwEDSSCq+9U1VZWrSE5XYUNVdZnayKnIhqMo=; b=Pja1IGwhQzUsxUk4/SjFyRPY+7H/ikp1t542kDXAb04MCGPQ2sV/Ex1PvSoCEJl5f8 0GkQdenJkZihkv93/+vc+lS2jMnYt5xRGbUOooD/yj1zdREElw9YMgwuKzdUY75zFUvI zvf/W7UpoauihwVg1IRGSQv3C0Ke82puq029vAYgdDw5gvvyvbHtKJly99VkOOZP8zKQ 9TVO48VglGop3VDwH/uEWlEoat+AuUBzn0OLO8Q2UR0XVjTSIDc3ttz6or6VAhtKP9j+ 0aO3zqVOSvVc7Bio9RO/gFD6ovhYS4PLviU/+DgYIKWaz62G7r9Uh7WyPQOPGjQ3Fynt e4Dw== X-Gm-Message-State: APjAAAXICW4IsTYcIdBiu7m8qxpk2ojOfhuj0LNoTawLBhuG2ogDGK+G iY9dl7PWWbZgieXVlS4kq1Frvw== X-Received: by 2002:adf:e3c1:: with SMTP id k1mr8247798wrm.151.1576186240242; Thu, 12 Dec 2019 13:30:40 -0800 (PST) Received: from ?IPv6:2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca? ([2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca]) by smtp.gmail.com with ESMTPSA id n8sm7605285wrx.42.2019.12.12.13.30.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Dec 2019 13:30:39 -0800 (PST) Subject: Re: [PATCH 3/3] media: platform: meson-ao-cec-g12a: add wakeup support To: Martin Blumenstingl Cc: Neil Armstrong , mchehab@kernel.org, hverkuil-cisco@xs4all.nl, khilman@baylibre.com, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media References: <20191212145925.32123-1-glaroque@baylibre.com> <20191212145925.32123-4-glaroque@baylibre.com> From: guillaume La Roque Message-ID: Date: Thu, 12 Dec 2019 22:30:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, thanks for review On 12/12/19 8:57 PM, Martin Blumenstingl wrote: > Hi Guillaume, > > (I don't know the specifics of this hardware but I have two general > comments below) > > On Thu, Dec 12, 2019 at 4:00 PM Guillaume La Roque > wrote: >> +#define CECB_FUNC_CFG_REG 0xA0 >> +#define CECB_FUNC_CFG_MASK GENMASK(6, 0) >> +#define CECB_FUNC_CFG_CEC_ON 0x01 >> +#define CECB_FUNC_CFG_OTP_ON 0x02 >> +#define CECB_FUNC_CFG_AUTO_STANDBY 0x04 >> +#define CECB_FUNC_CFG_AUTO_POWER_ON 0x08 >> +#define CECB_FUNC_CFG_ALL 0x2f >> +#define CECB_FUNC_CFG_NONE 0x0 >> + >> +#define CECB_LOG_ADDR_REG 0xA4 >> +#define CECB_LOG_ADDR_MASK GENMASK(22, 16) > do these registers have some RTI_* prefix in the datasheet? > that would make it easier to spot that these registers belong to AO / > RTI (while all other registers belong to the CEC controller) as i say register info come from amlogic BSP. nothing in datasheet unfortunately. in amlogic code , this register are called AO_DEBUG_REG0 and AO_DEBUG_REG1 in amlogic BSP... > > [...] >> + if (ao_cec->regmap_ao_sysctrl) >> + ret |= regmap_update_bits(ao_cec->regmap_ao_sysctrl, >> + CECB_LOG_ADDR_REG, >> + CECB_FUNC_CFG_MASK, > why do we need to mask CECB_FUNC_CFG_MASK (from register 0xa0) in the > CECB_LOG_ADDR_REG register (0xa4)? good point, it's an error i will fix > >> + logical_addr << CECB_LOG_ADDR_SHIFT); > FIELD_PREP(CECB_FUNC_CFG_MASK, logical_addr) would make it consistent > with the rest of the driver > then you can also drop the #define CECB_LOG_ADDR_SHIFT i will > > Martin