mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	In case the DT LED subnode contains "default-state" property set to either "on" or "off", probe the LED driver and configure the LED state automatically. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Philippe Reynes <philippe.reynes@softathome.com> Cc: Sean Anderson <seanga2@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Steven Lawrance <steven.lawrance@softathome.com> [trini: Update the relevant test now that we have support] Signed-off-by: Tom Rini <trini@konsulko.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			1017 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1017 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0+
 | 
						|
/*
 | 
						|
 * Executes tests for pinmux command
 | 
						|
 *
 | 
						|
 * Copyright (C) 2021, STMicroelectronics - All Rights Reserved
 | 
						|
 */
 | 
						|
 | 
						|
#include <common.h>
 | 
						|
#include <command.h>
 | 
						|
#include <dm/test.h>
 | 
						|
#include <test/test.h>
 | 
						|
#include <test/ut.h>
 | 
						|
 | 
						|
static int dm_test_cmd_pinmux_status_pinname(struct unit_test_state *uts)
 | 
						|
{
 | 
						|
	/* Test that 'pinmux status <pinname>' displays the selected pin. */
 | 
						|
	console_record_reset();
 | 
						|
	run_command("pinmux status a5", 0);
 | 
						|
	ut_assert_nextlinen("a5        : gpio output .");
 | 
						|
	ut_assert_console_end();
 | 
						|
 | 
						|
	console_record_reset();
 | 
						|
	run_command("pinmux status P7", 0);
 | 
						|
	ut_assert_nextlinen("P7        : GPIO2 bias-pull-down input-enable.");
 | 
						|
	ut_assert_console_end();
 | 
						|
 | 
						|
	console_record_reset();
 | 
						|
	run_command("pinmux status P9", 0);
 | 
						|
	ut_assert_nextlinen("single-pinctrl pinctrl-single-no-width: missing register width");
 | 
						|
	ut_assert_nextlinen("P9 not found");
 | 
						|
	ut_assert_console_end();
 | 
						|
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
 | 
						|
DM_TEST(dm_test_cmd_pinmux_status_pinname, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 |