File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2020 Nordic Semiconductor ASA
2+ * Copyright (c) 2020-2024 Nordic Semiconductor ASA
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -646,11 +646,21 @@ flash_at45_get_parameters(const struct device *dev)
646646 return & flash_at45_parameters ;
647647}
648648
649+ static int spi_flash_at45_get_size (const struct device * dev , uint64_t * size )
650+ {
651+ const struct spi_flash_at45_config * cfg = dev -> config ;
652+
653+ * size = (uint64_t )cfg -> chip_size ;
654+
655+ return 0 ;
656+ }
657+
649658static const struct flash_driver_api spi_flash_at45_api = {
650659 .read = spi_flash_at45_read ,
651660 .write = spi_flash_at45_write ,
652661 .erase = spi_flash_at45_erase ,
653662 .get_parameters = flash_at45_get_parameters ,
663+ .get_size = spi_flash_at45_get_size ,
654664#if defined(CONFIG_FLASH_PAGE_LAYOUT )
655665 .page_layout = spi_flash_at45_pages_layout ,
656666#endif
You can’t perform that action at this time.
0 commit comments