Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1845514pxu; Fri, 27 Nov 2020 17:22:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzjm134ZWvlZDhtqRoWMZRisC6/F1QQcwHevdn+mLzN3aoJP+84AL+tx4ymvKWMCQZ++W1 X-Received: by 2002:a17:906:174f:: with SMTP id d15mr10684060eje.15.1606526579711; Fri, 27 Nov 2020 17:22:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606526579; cv=none; d=google.com; s=arc-20160816; b=UJj8DCGJhXvNtJX93UJzs73OM3WR2aucWZ89JADT7GsQBrTSohA6B7DB6WgDJO7nZR RJ8FfDltoVPlkfR0qXRUxpIjTntggPDM7ADJwNcH18Moetpie+ybtpSMXy31btaiHOVn DIuW3L70AMBPiNjuRYC0/PTvCmPyeEfnbw0J4nDryZUqmSTlheUQuDjROfDtk0EvPeVj mpW4cudLyBWIcbYZhhHa7wBwOJ6uedw2UV7jbQXzAulyQ5GrVq0BQTkKdplkd8ba8V4d iwNjR8Eq6MB1LPFfaf+UQT03qRaXzRwzj7qSuSKHpKilYJEYvJ8I2aDX1+fcyDfzh7AL hq4w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ZzHUIAcJkfQ4yMJ+3D8uhEGiaG82a6I1rM1VddR6Ljk=; b=LRZP5FQ3LCprEQZuqRz7GeF+1kO+dD/pnjQIoXotx7piVb6+DjOc/4noLrGE0Df58l 7zRiSLF0UtgKdc63E1I169K8s/OgGuoEjzhdLeMfGFyUAgrtg/zC6wb0l/J6xWkYu8RH H3lIKjgs0/vSYz3qE7z3BD4ZabMULi/kXqVgdEvDSbpQlXexvHnLIAjoRotp22YepvPF jgfc+aM1n1yZKfNOa4EJa9SwoD4AOU0CZlbEXlqkJ1ekA2xrogaiRdFzgpSW9R5tpqYc jj0w1EQDPVzF7ys1diqh8z7Ch+jZLPGuuvP5w3qVhZSZHVDq0ewF9rDcQu5F19Nk62kH Kjlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=RZh0tbC7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si6284551eda.107.2020.11.27.17.22.37; Fri, 27 Nov 2020 17:22:59 -0800 (PST) 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=@gmx.net header.s=badeba3b8450 header.b=RZh0tbC7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730218AbgK1A5v (ORCPT + 99 others); Fri, 27 Nov 2020 19:57:51 -0500 Received: from mout.gmx.net ([212.227.15.15]:44957 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732191AbgK1A4t (ORCPT ); Fri, 27 Nov 2020 19:56:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606524989; bh=ZzHUIAcJkfQ4yMJ+3D8uhEGiaG82a6I1rM1VddR6Ljk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=RZh0tbC7BlG0urshsTaRhgFxZFwJwAE99KQ9gqlTWfS07OvuIide2+xUBup1eB/bA 493XIIWAPsKeAB5nplcU0KoaAKszBiRb2uSqx+omZNsDKoS3BKQyqXMgBk+XZQXk8c 4L2z4x0YlwL2o9Yb3H78x+ST82kV8ZqwYZOVootA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([78.42.220.31]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlf0K-1kInRX2KxO-00igwL; Sat, 28 Nov 2020 01:56:29 +0100 From: Lino Sanfilippo To: thierry.reding@gmail.com Cc: u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, nsaenzjulienne@suse.de, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lino Sanfilippo Subject: [PATCH] pwm: bcm2835: Support apply function for atomic configuration Date: Sat, 28 Nov 2020 01:55:12 +0100 Message-Id: <1606524912-16683-1-git-send-email-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:jdfU7DsUEvhMkWh8Prv5e4yo2mrgbndU0LflzdY48Lv5rZPE6cJ 2s7lKs5atD/6eozd9PQDBiPuGTV4mKVTsRsEMM9JxYr6tEW9Xii7Y1QmBIk+I40LvULPejH SFVQbnUguaqaAR125/XzqnmsPGnGYN50LM2f9iiu9oF8WA7CGbL+uRCVLgbOw2SJWQUCLxI eCXXmAo6KONu6luLslK7g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ymX10MsVhas=:Cgj/yIxRX4k6/e+KKr3Usp Kr4vbvRCOFUnGClJOdcte3iAemlH+Iqud0V54Lss0U0+qgFEY+/ZLxDfREvOGyI0qf68cFOob piVdq0acfdCkNpVIfrPbDZFRzMRyX2K/no499Vt0x0P06L7pyb0C2WhZWmXXASo75Af5PTgeJ 7yKUL0QzR91fWo/3nUOqpACAFdtBjhevk90LLnZ2RW6zp+JZLZe42L9y3fB3Dv4Fmx1GNu6JP I9kR61MfvLCBr5r+jlFfU7vCkr7r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