From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.emlix.com ([188.40.240.192]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZIUu-0005G1-TC for barebox@lists.infradead.org; Thu, 14 May 2020 18:22:23 +0000 Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 6D1135FE73 for ; Thu, 14 May 2020 20:22:13 +0200 (CEST) From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Thu, 14 May 2020 20:21:53 +0200 Message-Id: <23e433773ad942f3d2374c1befd1084fb3592f59.1589477005.git.dg@emlix.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 05/10] ratp: use poller to run ratp commands To: barebox@lists.infradead.org Cc: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= V2l0aCB0aGUgbmV3IGlkbGUgc2xpY2UgdGhlcmUgaXMgbm8gbG9uZ2VyIGEgbmVlZCB0byBoYXZl IGEgZGVkaWNhdGVkIGhvb2sKZm9yIFJBVFAgaW5zaWRlIHJlYWRsaW5lLiBTd2l0Y2ggdG8gYSBw b2xsZXIgdGhhdCBkZXBlbmRzIG9uIHRoZSBpZGxlCnNsaWNlIHRvIGV4ZWN1dGUgdGhlIGNvbW1h bmRzIHJlY2VpdmVkIG92ZXIgUkFUUC4KClNpZ25lZC1vZmYtYnk6IERhbmllbCBHbMO2Y2tuZXIg PGRnQGVtbGl4LmNvbT4KLS0tCiBjb21tb24vcmF0cC9yYXRwLmMgfCAxMiArKysrKysrKysrKy0K IGluY2x1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