From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 27F6935F162 for ; Mon, 13 Jul 2026 21:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783978897; cv=none; b=M4yI5AlzSfkdJTG7upcBf8ZuY0wRRauhaL9Hvb5x71tyVoGrytoUKtcVAzqj3e5wy3hGJ3mHC0BvjgrnjkYesh4kv4fTjiidd0AQILtt//YtrZJG8YVbFwAsgjws8crVeeqhLIcEFi2/Q7ZdcswiTr3Rm4ovfUWE5rFhY78SCTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783978897; c=relaxed/simple; bh=W+EwZnLFKVj1h1rZe5PgiDii2PS5+D3kv689Az0HHns=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=HJplkz2Qrq0CXTlBnAUdn+DUMAzBypou1kxr6t7ECPkAkIFiqV2S/caNJajJx6Elf0NMtrOdO9Jm0bdfLLMtR5cEbtnrm2z+aBUQByIbf7/2rntapw6B0Sdcivp2RRJzKzpNG+RR7BddBJqOIl79tHH4xZpsMF3pWdFXhquLqSY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bxhAkBTg; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bxhAkBTg" Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-c96bfabc8d4so176936a12.3 for ; Mon, 13 Jul 2026 14:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783978895; x=1784583695; darn=vger.kernel.org; h=content-disposition:content-type:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=v+T9ncXsQofNw87dQE5f2mF+cWycslyRRbsUPole34o=; b=bxhAkBTgM1Mx7Bf736Hc1nC1egZvJeLXvKmQMFLJo+3SPFTYwFf/VaJt8XH0OYTyM+ +JfmQxiBQQzmHXTkrAw6f1kXNMTG8/eJkZCKcs2pBgMxnPUFbEGtESTM3i/R+mff8zhV zxSy2gBju6ZGkobXHvJD11Q8MRW6TgAvRzFMDEKx/A4/Xl1e2WqZb/yKG6/t1YOA+GsK ZjK84TSR7RS1gKf69dqNJqIr+E5lD+Nkm3MGF+8jqAcph1PbWMeOtrPC7wREaMJgy01n o/CpfbtM0Q9pKQ3pwzJ+uItyiWGWoor6VdKhN4XCErlqVtz2JVOjiPPcoxtLwij8xcaj 0jkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783978895; x=1784583695; h=content-disposition:content-type:mime-version:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=v+T9ncXsQofNw87dQE5f2mF+cWycslyRRbsUPole34o=; b=axKHYJedA4mj26ixPDzbH4RUHf4SRLBFA9234pNSLWMjcbpA9jlTRB2gb3mTxv3b+Q vYm5JOOpSa89OYIGLxME/U5CcEUe6Q6Ng0ervu14E6cokTDwpuR3bV3YlGDtgboJQi7P RFwCzMHiCGTU5GwUAZunQNiKhGR/QsOzboc9JkF73KhAjpXrl0ma9Et3EgGoPteuxsJB kmLG3DKR+6XArhMFFF1+qWuRSdWVAdEkUdYXFSfdKLT95L4V0Kmu5Lp388cxLOgPkqUb GpOtP/j/8ZghiO8W3ryJpnQjjB+zKqH6lLfYEskCnlp2oob06H2KFjoCnyCZQX4wsyde 8MBA== X-Forwarded-Encrypted: i=1; AHgh+RrFV9tO1OEt1fiqRKdvvtdwYrJkApeAFeCiBvreuQHaHL+Z9Qm1lBnEopwqhEwx+4xcMexbFR5wqEkqkhw=@vger.kernel.org X-Gm-Message-State: AOJu0YxCbiXNnEGv2o6alx+wJEfhcBIYTR2sjxPZTf1lsnjTn7EaqMOy Mv8QUOqcHQBvNobRA4ezVBzuh8KikBwXiqdvvWuwLlqt3/tuhIwecQ9F X-Gm-Gg: AfdE7cnMEWbpoUMARpfXWJncrZDRLMe5kogZ6Mo+gzaz9cZjMINm8uQh9cuPgxPw6xh 5yne5LPrBH6yUscOWAQRCQe9EA6xsUQYR30pmuUD5Xb8II5oDgXfAplq7SlGsXnrWErkTkyCl5R /klfJRx9ZBOHyqK+Y2hBoBd+E3MaTsx1SmTsKFwFIahRYh0PaNksYzyIxyNwSckLyEQgoxLA72k lnxQg83cWOv0yV+RvJwFIIvLfON9wbuSUSfS62OipS/9m/h5LMDktwkrgvXrCK3uFGBBHVL3qo8 tI3zhEHDahPpoJXc9BQBfG5Qk7xSd2k8we2PMUBHuR+C6XEIz/ZKCEZEpMzP2hm3JKZAbTzx3t+ 178JrJT0pQHL4HmA+Eb7GEZPMzIclNPoQP+LhOKXMJPYXAVaW3ZvXkJIgfs5Npuhj+ZQw7SmtEs 5ln34TL0qfqyNSl+eVRxXHmW11Imv7FHZS0V6/IaKKoD/umyaSxmArFtNDO0bGaugl X-Received: by 2002:a05:6a20:431b:b0:3a3:327:c5c8 with SMTP id adf61e73a8af0-3c10fc4dac7mr11212239637.0.1783978895328; Mon, 13 Jul 2026 14:41:35 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:e15f:5d5f:580b:f2e9]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3118389d9bcsm62379929eec.20.2026.07.13.14.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 14:41:34 -0700 (PDT) Date: Mon, 13 Jul 2026 14:41:31 -0700 From: Dmitry Torokhov To: Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz Cc: Linus Walleij , Bartosz Golaszewski , Kuninori Morimoto , Mark Brown , jacopo mondi , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [RESEND PATCH] sh: ecovec24: use static device properties to describe the touchscreen Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Convert the board to use static device properties instead of platform data to describe the touchscreen, so that support for platform data can be removed from tsc2007 driver (ecovec24 is the last board using this mechanism of describing tsc2007). Device properties do not allow custom board methods, so the method for getting "pen down" state was removed (the driver is capable of working without it). If this functionality is needed proper pin control/gpio support needs to be implemented so that the same pin can serve as an input GPIO and an interrupt. Signed-off-by: Dmitry Torokhov --- This is a resend of the patch I sent in August of 2024. My fault of not noticing reply from Adrian inquiring about potential negative impact from not having GPIO-based "pen down" detection. I believe this is fine, the "pen down" is an optional feature and the driver can detect the touches even when it is not specified. Additionally, this is an evaluation board, so user impact should be negligible. However the bigger question is whether ecovec24 board still relevant. According to my research it has the following regressions currently unfixed: 5716fb9bd9c6 ("mmc: spi: Convert to use GPIO descriptors") - MMC SPI device naming broken (broke SD fallback mode) 9fda6693335c ("spi: sh-msiof: Convert to use GPIO descriptors") - SPI CS polarity inverted (broke initialization on the MSIOF0 SPI bus) c2f9b05fd5c1 ("media: arch: sh: ecovec: Use new renesas-ceu camera driver") - Camera array sentinel missing (causes out-of-bounds reads and potentially kernel panics) - Camera standby polarity inverted (enadvertently keeps cameras permanently powered off) - Camera disabled iby default (board defconfig points to a deleted driver) They are ~6 years old, so I wonder: do people actually *actively* use this board with modern kernels? Should it simply be removed? Thanks! arch/sh/boards/mach-ecovec24/setup.c | 38 ++++++++-------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index a641e26f8fdf..110a77f903b5 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -589,39 +590,21 @@ static struct platform_device keysc_device = { /* TouchScreen */ #define IRQ0 evt2irq(0x600) -static int ts_get_pendown_state(struct device *dev) -{ - int val = 0; - gpio_free(GPIO_FN_INTC_IRQ0); - gpio_request(GPIO_PTZ0, NULL); - gpio_direction_input(GPIO_PTZ0); - - val = gpio_get_value(GPIO_PTZ0); - - gpio_free(GPIO_PTZ0); - gpio_request(GPIO_FN_INTC_IRQ0, NULL); - - return val ? 0 : 1; -} - -static int ts_init(void) -{ - gpio_request(GPIO_FN_INTC_IRQ0, NULL); - return 0; -} +static const struct property_entry tsc2007_properties[] = { + PROPERTY_ENTRY_U32("ti,x-plate-ohms", 180), + { } +}; -static struct tsc2007_platform_data tsc2007_info = { - .model = 2007, - .x_plate_ohms = 180, - .get_pendown_state = ts_get_pendown_state, - .init_platform_hw = ts_init, +static const struct software_node tsc2007_swnode = { + .name = "tsc2007", + .properties = tsc2007_properties, }; static struct i2c_board_info ts_i2c_clients = { I2C_BOARD_INFO("tsc2007", 0x48), .type = "tsc2007", - .platform_data = &tsc2007_info, .irq = IRQ0, + .swnode = &tsc2007_swnode, }; static struct regulator_consumer_supply cn12_power_consumers[] = @@ -1242,8 +1225,9 @@ static int __init arch_setup(void) gpio_direction_output(GPIO_PTF4, 1); /* enable TouchScreen */ - i2c_register_board_info(0, &ts_i2c_clients, 1); + gpio_request(GPIO_FN_INTC_IRQ0, NULL); irq_set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW); + i2c_register_board_info(0, &ts_i2c_clients, 1); } /* enable CEU0 */ -- 2.55.0.795.g602f6c329a-goog -- Dmitry