Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1982234pxv; Sat, 24 Jul 2021 01:21:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWvWWgGEAMVsgmu9cRTjWKj2vYwRQ3wdj5wpntWZJhcFwxgn73hCx9Z46P9SFJeFjM2DG9 X-Received: by 2002:a92:b748:: with SMTP id c8mr6148155ilm.302.1627114899008; Sat, 24 Jul 2021 01:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627114898; cv=none; d=google.com; s=arc-20160816; b=t20lpxQGG1o8TaMLx2MNfTqXzlqRx5ri5j4xC06AQCPut6F0+v0R0D+5t6QbwcWRlt cZMO37zjQt77vU4HQKJQmZcEQjgKi1DqXGCQ6sNbXI4i8H/jPmXPlxTqMrrFSDKxk3jS HE4ehaazpc7PWdu4Kr8UkhwRMAmrFVKftJS9UTcn3o/qnjk7YArHO/HMDKnw/HsCVyCe aiTy7NgDITXuDDHXedvctyzNKY2NmkV+tmS6+QlpuouxhtjXEB1nmWI9x40CZPGHa7gz 7DH45Wu3jsJA3crQx8otNgaQSIXgB4kSNOvJeFAZUcJHp4D2KSWlvcxC7jm7XFk9alO8 CokQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oz8R6JzK/dsLcXIYjmpTj+oBt2JJQ5u816nXyN6D10Q=; b=XMYH8LJF9ZefH+jz/MH1z6fRF5HlLNWK1RpkQta1K65sUa8N57otJ3tuuvCwNohtpM fmtAlmiS3IDJdgIE2YWRBPgrfMqR/AVauv3oZCorg7cSq/tQMsiHqsps3KcLYUSR5gCh VmZ/005ZWH8dv30JInwiXmz3BX6s9hFSDq69dVD1kF/7++NzWJX7dDYBpLg62ZosHuJS rbz/Yf6FxxxuTtPz8m1ftUBC1yYkJD1L0XmKQ6r3+72C2qVYohkLsmnk8hGe8uPiKWrW o8xxMBpoImLPL3BaG39+mFYuP8PRW57IGZSBo96Xhi8s6khZgfG01ZN2iH07+m7RRjkV 5bDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=IInVGTfx; 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=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si24936596ile.132.2021.07.24.01.21.28; Sat, 24 Jul 2021 01:21:38 -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=@mediatek.com header.s=dk header.b=IInVGTfx; 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=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234886AbhGXHik (ORCPT + 99 others); Sat, 24 Jul 2021 03:38:40 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:26670 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S234853AbhGXHif (ORCPT ); Sat, 24 Jul 2021 03:38:35 -0400 X-UUID: 66f4895c0d4b45ce8ae2212ca1067df7-20210724 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=oz8R6JzK/dsLcXIYjmpTj+oBt2JJQ5u816nXyN6D10Q=; b=IInVGTfxFKK/kwhZh6NBWauSj7SH+RAMxhrDQxjLoAuFOr/MIWapDZ5uNQTlIcnXjWh0sFMVDmRch/hwFAcB0GrKGxc+hLdnfdVfLs0Hf9w9JnBbdd94v3yDspoGykawCOOw1B8M2uEegY7Ka3BLcRrQTECOAlt/r65ohM5nn0w=; X-UUID: 66f4895c0d4b45ce8ae2212ca1067df7-20210724 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 555332565; Sat, 24 Jul 2021 16:19:03 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33N1.mediatek.inc (172.27.4.75) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 24 Jul 2021 16:18:55 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (10.16.6.18) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 24 Jul 2021 16:18:54 +0800 From: Jitao Shi To: Thierry Reding , Lee Jones , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Matthias Brugger CC: , , , , , , , , , , , Jitao Shi Subject: [PATCH v6 4/5] pwm: mtk_disp: fix overflow in period and duty calcalation Date: Sat, 24 Jul 2021 16:18:48 +0800 Message-ID: <20210724081849.182108-5-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210724081849.182108-1-jitao.shi@mediatek.com> References: <20210724081849.182108-1-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 00542DEEE62E7D67BBB1D34FA5DE6387FF294617A841F8A5F6153D1AF11FE15A2000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Q3VycmVudCBjYWxjdWxhdGlvbiBmb3IgcGVyaW9kIGFuZCBoaWdoX3dpZHRoIG1heSBoYXZlDQo2 NC1iaXQg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