Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp657671imm; Tue, 5 Jun 2018 02:11:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ6zvcmdlO1kuuO5X6P5sSTne+wFEC6E9w85PeGfzabpWHc3Bb+vonqBtC/qZAXPU0xGFot X-Received: by 2002:a65:57c6:: with SMTP id q6-v6mr14974780pgr.160.1528189916662; Tue, 05 Jun 2018 02:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528189916; cv=none; d=google.com; s=arc-20160816; b=kAItPx4jZOrZTnahlxPt7U/8j5JqNUH3tIGZuC0+rBAt6QtGPOrmNAKHp4F9roWbuU mg1Jodn9RYYw7ogj8CVViT7OVcoe3M9pwd0UTZlAzeT/Fw80dQ/uHF8VJTsVv5J58upR hXwUzu+9e1cjmjrzUqUxfwgHHDdVQ7E1ubaIvMfrsnSWM4eEsX73a4qW+f1gP+saTib3 d2Caqcin2XNpKUD3sedzRjsOQ8V+6qkhp2Muid3mdDfyleDzev3NR4MJwckU0j1/Gzbd 3UUE6mwhBXzjOe27dnTQTP95yqCegovrkIMZcMsTwiI2hbJeuYYwi+6mBf/NcfOI32YJ 7ETQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ZjofEI+bEaHO/J8kGzcBrr06D2sEqe4DZP0ZCG83OOU=; b=otbdNs+SwfN1P2wlC4yGTuDn5yakrF65WHevZ10gdD58AROrKG50ZCUe/EZOPEc8E8 7HMxP4A7ITxx1n++TQmDEExKI9Ekp6fl8C20jYkxZFHHX18r6wzIvU3KwvV2RrKTEebQ ZbzqpOdvnlMuzKSVGTh6TGqPyc2Bol/GzI+8AWbjDNXdbVmElkuwNWKcmQv/Jox26sjs tsdFFRYhHogCqOjRQyPizxGv2bxSJhG/bDiPHPIQI1z7dwE9zuDikyhs4wq2kTQBLShf tkfvXpoRQpDoLp2yuPE93Qp9m9vSQDXsPcZvE/v39ktJ4p+zxT7WCS++eAvXp/lk271Z OtFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bD7UcF41; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20-v6si10497018plr.240.2018.06.05.02.11.42; Tue, 05 Jun 2018 02:11:56 -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=@gmail.com header.s=20161025 header.b=bD7UcF41; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbeFEJKS (ORCPT + 99 others); Tue, 5 Jun 2018 05:10:18 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39667 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbeFEJKF (ORCPT ); Tue, 5 Jun 2018 05:10:05 -0400 Received: by mail-wr0-f195.google.com with SMTP id w7-v6so1538368wrn.6; Tue, 05 Jun 2018 02:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZjofEI+bEaHO/J8kGzcBrr06D2sEqe4DZP0ZCG83OOU=; b=bD7UcF41sSAEXsfQ0TjEEUOxE2QRPTHVRMpYshPljWVsNxjrKCR/cYa+MvNyQk8ZQf QLt7LOZmMC+r/LV5+/A6Q99vN2/czlRJkiwhw9w2bKTDsN/E9LxfH/tKBRPmxio4o43A QXmFR/lnRvBexePRv2XyuYjvv7pdaAApq6RkI3KBEskbTF06Rip+EyotpWcuSx2lvVYK SttA7V7V0ungzi3XRpngQFKZjxdwQv+ArbDtZYNnn41rvMBGVufE3bEldlVT18r5qlb6 J2YIVnPLSvWLbhcFNC2AlRszW4NGIOrLMvdgz+odBNFNq+bPpGwFD/utYRit0+Amq25y OU3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZjofEI+bEaHO/J8kGzcBrr06D2sEqe4DZP0ZCG83OOU=; b=UgcktoaDAfSKlR/2iNtJgK2Nb9uAdhWOvGl5H6/YmiwPFzV3hCB0Gcsd1P1dgUcgkS cdAxffDpVAy7K92fBA3/ip6TuDgPNeKDMERWa7nXEYR1QYhN6ZUOsFhEpLWkbgrPmWZE 3bUN/DAu5LY8taM1h7MPUHQfJhwJmsLRvsqDgKxVn0Vr+Fo7+DJ9KunIq3zxxZQDnxiN O7AO6ga1LZoO2Y2GF4Erfi7eVJoZpgCumQpvuMy84hu+zFUOUlcl4Tz5RGiCdAyAIerJ VZtSRHNkkYHSBuBnOOVEov04rxh9Qlx5pT+8Nx9pD0J5d9i1fMzPR+4/k+EJgDaMxcV8 KjxQ== X-Gm-Message-State: ALKqPweUE6oa/amhemkQ/1Lo8jXYLnzWmfCZxI83YDucoGWhiFBxshg7 lJqZG9sYe2T1c6SepHQ2GN4= X-Received: by 2002:a5d:4049:: with SMTP id w9-v6mr15212217wrp.96.1528189804430; Tue, 05 Jun 2018 02:10:04 -0700 (PDT) Received: from localhost (pD9E510DD.dip0.t-ipconnect.de. [217.229.16.221]) by smtp.gmail.com with ESMTPSA id b80-v6sm1641076wmf.2.2018.06.05.02.10.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 02:10:03 -0700 (PDT) Date: Tue, 5 Jun 2018 11:10:02 +0200 From: Thierry Reding To: Thomas Hebb Cc: linux-arm-kernel@vger.kernel.org, Antoine Tenart , sebastian.hesselbarth@gmail.com, jszhang@marvell.com, "open list:PWM SUBSYSTEM" , open list Subject: Re: [PATCH RESEND] pwm: berlin: Don't use broken prescaler values Message-ID: <20180605091002.GB20649@ulmo> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gj572EiMnwbLXET9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 04, 2018 at 02:32:41PM -0400, Thomas Hebb wrote: > Six of the eight prescaler values available for Berlin PWM are not true > prescalers but rather internal shifts that throw away the high bits of > TCNT. Currently, we attempt to use those high bits, leading to erratic > behavior. Restrict the prescaler configurations we select to only the > two that respect the full range of TCNT. >=20 > Tested on BG2CD. >=20 > Signed-off-by: Thomas Hebb > --- > drivers/pwm/pwm-berlin.c | 45 ++++++++++++++++++++++------------------ > 1 file changed, 25 insertions(+), 20 deletions(-) Antoine, Jisheng, can you guys review this patch? I'm personally on the fence about this, even if we can technically do the shift in software, I don't necessarily see a reason why we can't "offload" to the hardware. Thierry --gj572EiMnwbLXET9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlsWU2oACgkQ3SOs138+ s6GVRxAAjtDtoWcWJDED+8JBGHIwJ4bkBhydvYPZdxgcyemoA6A5BfjqloDGBOKh Ly6bVZbtxMy89hhnXlsrG5n2LPWbx/RzzTdmdFVSlmqZY7dbXSzhGs1ADIApG4DF iGjCdJtz8A60vCWyIY6TvYGmwDwth6R+Htk/j12rDWy91Al7k14NX+e4OfLAF0XC ARDh5NC/YrFaUbTbTNc36mrT/yUNag5ysmYhTcubuQC92Ogjhkvf1dE1eIjoMb91 YLTFf15S7arZGyU5Yz71Tdolq2yEMuTZKh8vAH+Jk+hM7kQ8bSwF0UxaIvFCx6OL 3cK6bkdpxrNGSU1Y27HXauUUqGFLSb/o1DqTGry0a/FFSHcpjfc/Q3vFdaPvU98N 9MJY8DoHJ8FN4b/vlhf2xb+JtG48dZyb9AwNkEdncrKfg7SU064VrYagSt6DU3vn /f3eLJLAQutiK7AejJs9Jl0RpU9I3ePoYIHgU28NxEYXA5Ok33dmmUbIB7l+XBnP mneag4aRTVwe5CHlO5+bCL5UV+I2Ea6FUDyel1sBxGiy0sT9CAy801yjCtM9hywR yDgWqM6I9lG0kA8XlKgKNEzTGzW0/+8a+0aAXDEmdax4/IywL66sY3gc20KeWVWV nlA3BfPgEO4JMbUIRCBS7KEbL2iEyAt4mCMiteVH0d0H9/1HnsA= =N5PO -----END PGP SIGNATURE----- --gj572EiMnwbLXET9--