Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp891392rdd; Wed, 10 Jan 2024 02:42:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+UcIbbtPsLMz3HVsMT678d+g/xq3pyvG62gm9IRyaJZFDWwaWksDu/fvJvi8XJTdGyAt+ X-Received: by 2002:a17:902:d353:b0:1d5:5371:a287 with SMTP id l19-20020a170902d35300b001d55371a287mr627505plk.45.1704883334599; Wed, 10 Jan 2024 02:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704883334; cv=none; d=google.com; s=arc-20160816; b=A9hXgyLxm9xpS6AZQcS1GjVe1hZpeT13zgJ8SI2/Ce4JGjoCVP5VZIMWqjhAGks+OS N0gFkf3PIqrAV+WdWNtGz1CpcHrVMcggDrFvayq5k6Uq7I4Xw9t7rqeZiD8ygEuc60fJ EJ8UxHB9vWDx+ZhxXYHEjTbBbUqckp1QEd/gp4INHk9l0Q8ElzKWt3kWqAvxVOmZJWrP A8Krv+PRjpeY8yQZOS8sPsiXvVfbW5Myqg20DzEVrXWa8e0RZS0ZQ76oVnPImG9jeZ9m /h35cKVbrbZtuyFMPRefkIxrUNVSWBhjQC6JJz701i9UXPZESI+Xkycsjvk6lq7kObeM lAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X4OrxluJS1Dxt0QsygYV4JA7ss0pHdXLycYpqP8S/nY=; fh=L3T8yf8vSzHphCvhrp7B+WkrE2tyOzsKyWRf66adBdI=; b=FSxnozHvebsa5ucded72zt2KsSSCP3r1tvO76GzcRbBsRTwaWtugPiOybpZeK8DcUV GbAvxFCa3lgwOCQ9RWc4NXKHxybQPcoVgp2jH5jNWe68CLnN+Hs87TSFqbrEfzjLpCa6 LLsJb4llzMHvijOIQ1S+nyUho+q0fA8n+Fg/VVID74brvh+xZnvIm/oYRX0mPPQX5NlS 10ol2JG+7rfTgxOuFgwTv4zbJNazBpiWinntnk15GCYtW7u1E6jtUO8vW8PjnW1G3ez8 y1JHe8lYnA5u/8ylOjffjIp3cR29tvGzMWO1NOHDYu/1AiE4Yun0B9IN9Fm3Ukrp/3AL xlNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XiaxeP1F; spf=pass (google.com: domain of linux-kernel+bounces-21978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s12-20020a170902ea0c00b001d4a4306cf1si3451216plg.606.2024.01.10.02.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:42:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XiaxeP1F; spf=pass (google.com: domain of linux-kernel+bounces-21978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C42128DAE9 for ; Wed, 10 Jan 2024 10:24:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56A11481AD; Wed, 10 Jan 2024 10:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XiaxeP1F" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C80AB3FB27 for ; Wed, 10 Jan 2024 10:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e4d64a431so18438355e9.0 for ; Wed, 10 Jan 2024 02:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882077; x=1705486877; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X4OrxluJS1Dxt0QsygYV4JA7ss0pHdXLycYpqP8S/nY=; b=XiaxeP1F/NrMhXsnnLE7Hr2pHbh298NywDAybFLZmrWm632DevmscaQ+QMWERiOvby XGtbUetrkmiFlSiM9wLA+UqdgnLXsroAnsJ21jjBuU2Ko7CuZVb5Fgb2MK5+nVpy9ujQ e1tZzL41uyarHCe9d3kcphhPjfUS9jVf4xVwB8tkaLka2kquTlbixIzFt5IGfXJIFJ// 8Poofs3EJCBg5Adu4UQOJdqaO/rpp3YNlgqLIDQucmev/hWnrO8McsoB9jepyfvruQwh A9xacRXOOsDENxKLPzwwjBxhLLveuh4ALxrANCMAYSw1pbSmgyqsESohQmRWjJ3G7alR DfFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882077; x=1705486877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X4OrxluJS1Dxt0QsygYV4JA7ss0pHdXLycYpqP8S/nY=; b=QxbX/s0sbF81E8MvXwAkWceQehhgEEeZvJDJ+wnOMT+54axtuTJl49aW6JHnUUUQyI Us74t05hFmYn6zMo3fAgtp3lIGTWgsjlAGf9sFcU1UMRmEL5VY5TuHlE2z1WJTyc9g40 f95TdmRb2bazcRGybZfDzmadNsH6ixmTwwymvXgXxx+gyJ32YEVdMtouOQdfIFBfsxAI UYZXVoTrw1NC5WwhadKWcPgBMXplsDfFXFivcfkz/9sD/W4D6cPlIneHHWmAMWg0yuOX wLe11wQJqmhZ5BoNsOEaGiIxrxj3RPS+bWntA/5GVnSBA5J3Ayj2aGLNF4i7iyI7ZA2p Fwsg== X-Gm-Message-State: AOJu0YwmPtT6/acSqAHFzILGU7J4has6oZDqvnMg83ACOKXsne7VYKcR wcjpXimpVR6mFtArR2HC62yx/X59K9oZfQ== X-Received: by 2002:a05:600c:511e:b0:40e:42b4:23b6 with SMTP id o30-20020a05600c511e00b0040e42b423b6mr498393wms.55.1704882077261; Wed, 10 Jan 2024 02:21:17 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:16 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 12/18] tty: serial: samsung: use TIOCSER_TEMT for tx_empty() Date: Wed, 10 Jan 2024 10:20:56 +0000 Message-ID: <20240110102102.61587-13-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The core expects for tx_empty() either TIOCSER_TEMT when the tx is empty or 0 otherwise. Respect the core and use TIOCSER_TEMT. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index f2413da14b1d..46fba70f3d77 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -990,11 +990,10 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) if (ufcon & S3C2410_UFCON_FIFOMODE) { if ((ufstat & info->tx_fifomask) || (ufstat & info->tx_fifofull)) return 0; - - return 1; + return TIOCSER_TEMT; } - return s3c24xx_serial_txempty_nofifo(port); + return s3c24xx_serial_txempty_nofifo(port) ? TIOCSER_TEMT : 0; } /* no modem control lines */ -- 2.43.0.472.g3155946c3a-goog