From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588B3C3F2D1 for ; Mon, 2 Mar 2020 06:44:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38DE22468E for ; Mon, 2 Mar 2020 06:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgCBGoR (ORCPT ); Mon, 2 Mar 2020 01:44:17 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41169 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgCBGoR (ORCPT ); Mon, 2 Mar 2020 01:44:17 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j8eo6-0004Yc-1e; Mon, 02 Mar 2020 07:44:02 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1j8eo1-0005p9-Nk; Mon, 02 Mar 2020 07:43:57 +0100 Date: Mon, 2 Mar 2020 07:43:57 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Roy Im Cc: Bartosz Golaszewski , Brian Masney , Dmitry Torokhov , Greg KH , Lee Jones , Luca Weiss , Maximilian Luz , Pascal PAILLET-LME , Rob Herring , Samuel Ortiz , Thierry Reding , Thomas Gleixner , Support Opensource , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pwm@vger.kernel.org" Subject: Re: [PATCH V9 3/3] Input: new da7280 haptic driver Message-ID: <20200302064357.ke57i2wchulph5f7@pengutronix.de> References: <1569958274d409298695cf86184c7b67aaf19bef.1582270025.git.Roy.Im@diasemi.com> <20200226161307.6tv5q2yh62cp7vk6@pengutronix.de> <20200301212025.lw4f6uv453oulu22@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Roy, On Mon, Mar 02, 2020 at 01:52:30AM +0000, Roy Im wrote: > On Monday, March 2, 2020 6:20 AM, Uwe Kleine-König wrote: > > On Sat, Feb 29, 2020 at 12:59:20AM +0000, Roy Im wrote: > > > Okay, thanks. I have tried to update that as below. > > > Could I get your comment if you still see anything on this? > > > > > > /* Maximum gain is 0x7fff for PWM mode */ > > > #define MAX_MAGNITUDE_SHIFT 15 > > > [...] > > > period_mag_multi >>= MAX_MAGNITUDE_SHIFT; > > > > > > /* The interpretation of duty cycle depends on the acc_en, > > > * it should be from 50% to 100% for acc_en = 0. > > > * See datasheet 'PWM mode' section for more details. > > > */ > > > if (!haptics->acc_en) { > > > period_mag_multi += state.period; > > > period_mag_multi /= 2; > > > } > > > > Much better. Extra points if you add a link to the datasheet at the top of the driver. I didn't look at the datasheet and > > assume that the reasoning is obvious then. > > Okay, then do you think it would be better to remove that comment(the 3rd line - datasheet)?. No, please keep the reference. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |