Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3022016ybh; Sat, 25 Jul 2020 08:32:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuTKc73Ovx0hy8Cgue1V1OHOU86E7TMk8fCj76S/ijgl/BAR8uMs1p1pTMz9uEl7fVGaHi X-Received: by 2002:aa7:dd10:: with SMTP id i16mr14062327edv.227.1595691130677; Sat, 25 Jul 2020 08:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595691130; cv=none; d=google.com; s=arc-20160816; b=RgywtDAgRIFTPR9zdAKwMDkxh+ry4SsKCwN8tdixnx1T7FIFw0XEHIcREfzKUptDpe plohWHWfz6TCWo4nnq5Er0n7Bsy173TuA1AkOTdnN9x2BivFGE0tAMrt+9RD7J/ta9bv QrGVqIjBrFn1O5QqwaZpAnadu3vvojVmo6c5tPYk5LBXxhf0Y4Z1v4Z+EnGATeTOgpMR ubuRGdAYEWjptrs6IG2ExHRWexSARo/NE/r10RlIBR9O6wSzTQzo9NqfAs+QgpaGWRr6 CUje39SVsUT9oFiT1dD9ZufQ1DoDejz+aegNw9Scs+TZk8nsn3SsXcOXngDbAGzJcWM/ umGA== 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:dkim-signature; bh=FR6Dp1DwruwS2azPHTv2qb7tleyh4uVI6t5Ki9azlJY=; b=N2zAsEcTy7h+c2rYzot9X+p/AdJDavTpsogupGQzqrrSN5d+wh4xAI31K017PPt3Y5 pnoaVt0iQt3eWihaQ4AIDhkzxzaeRHYGbxYx4c9MVUFqE14gBeYqxEB0R5K9kzm9PUL5 ZZN4iZ5ORu1k6fHTZGcyhkBSJ7D5sodpag9nVloszLn6OkJaEGU7Li/DXatUgzzp91Lm 5pPWHU8AI078nAEMN6+RMROmjk4rOrIMRoDGWu3t5lJjESLL2aRBukfviUkrsjQiLIxy KTQ7/Htq/suTQV0Qjei8NxDEbj14AyAss5LvxZqbprzm5uF+W62rzR7SDNOmn604bM8J xdqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AFUoYUJz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si2439265ejb.579.2020.07.25.08.31.45; Sat, 25 Jul 2020 08:32:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AFUoYUJz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbgGYPbf (ORCPT + 99 others); Sat, 25 Jul 2020 11:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgGYPbf (ORCPT ); Sat, 25 Jul 2020 11:31:35 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D80FCC08C5C0; Sat, 25 Jul 2020 08:31:34 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id g7so4587255ejw.12; Sat, 25 Jul 2020 08:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FR6Dp1DwruwS2azPHTv2qb7tleyh4uVI6t5Ki9azlJY=; b=AFUoYUJzlD0ujrfjmTQivGD3aK3f626Pvakeu4Sg3IfEIDnJ3m1LhvT5ayAJsphM/R UMIWUNDCVbfgcqbAB9VZkQRWnx35an9XabgBXSNB271/oeqjYBZiBmDOEDjEunw0+sjD C7mL43cwcaNnI+KaxNACIuCCaR1WlYOtbzc3LRXoiF/yOUtgEYmtFDbwa+oDSfvJZVJE 9j6hS5oTB6WTCTBkXs5zWCT9tvr4jjBEVeNDSU2dPr+oaf/4PA58BM99374omurbdj3+ nD9Aj5L7YTtcruqhFgN9b+E7XDDfoM9QJ2V2MixEbHeE8J8qQSmQGN33/7sP91maudu6 OI0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FR6Dp1DwruwS2azPHTv2qb7tleyh4uVI6t5Ki9azlJY=; b=Rl2sxRSnEVVQEC/t4J3YhqqRF8IeGm4CGVG47dU98M0r71uiLJyULgXc5DM8oV/2+o 5EO03Q54sbN89ek0Hll6o4X5WyVvNRX9f1f2Yy/Y+luI3lNzNfl2qEdSg0nMKF4Fx78G l5fkZyoP9eB3xgBtHBSiYxtGiPtnS8JeBtLnYGkx8CqDmDlqO3VxsP6cBt5Su/Ug2XkP 3A3rJhkT4O5Lv76CqW2drZV5n43+ibluDG18XB9jU1CpGhBw83BeNWqXu5S8nJj1pF5C plxIXvPBCbb4kx5nD56+BuNg7ww3dfRUHOe7NHwgmnNHyeYJqDaooj1EUvTLcLLdhnrO TCug== X-Gm-Message-State: AOAM533vJJ9dsTe0DTmXueU0TODFlRKwtYvNxpyxsIklSE5L2UbUChRX PQ5O3xDU0lXbIj1uANc5H1rD9gjy6oNSdIlaYek= X-Received: by 2002:a17:906:f106:: with SMTP id gv6mr11788715ejb.221.1595691093472; Sat, 25 Jul 2020 08:31:33 -0700 (PDT) MIME-Version: 1.0 References: <20200724213659.273599-1-martin.botka1@gmail.com> <20200724213659.273599-3-martin.botka1@gmail.com> <20200725152442.GA11424@duo.ucw.cz> In-Reply-To: <20200725152442.GA11424@duo.ucw.cz> From: Martin Botka Date: Sat, 25 Jul 2020 17:30:57 +0200 Message-ID: Subject: Re: [PATCH RFC 2/6] pwm: core: Add option to config PWM duty/period with u64 data length To: Pavel Machek Cc: Fenglin Wu , Konrad Dybcio , Jacek Anaszewski , Dan Murphy , Rob Herring , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +#include > - gain_q23 = (gain_q23 * dmic->boost_gain) / 100; > + gain_q23 = div_u64(gain_q23 * dmic->boost_gain, 100); Ok so using a macro. Thank you.