I agree with Hung-te, this looks way more "elaborate" than necessary. Please don't over-design this from the start, just write the differentiation you need right now, you can always add more later. You don't need to have a structure full of function pointers, just call a function (e.g. mainboard_power_panel()), implement that in both panel_kukui.c and panel_krane.c and only link one of them in.

Do we expect that Kukui and Krane will always use a 100% distinct set of panels or will there eventually be some overlap? If so, maybe we want to compile all the actual panel info unconditionally and only put the <board>_panel_info arrays into the panel_<board>.c file (so the linker GC will drop unreferenced panel info structs).

View Change

To view, visit change 32511. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I19213aee1ac0f69f42e73be9e5ab72394f412a01
Gerrit-Change-Number: 32511
Gerrit-PatchSet: 17
Gerrit-Owner: Kaka Ni <nigang@huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jerry Han <hanxu5@huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jitao Shi <jitao.shi@mediatek.corp-partner.google.com>
Gerrit-Reviewer: Kaka Ni <nigang@huaqin.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: YH Lin <yueherngl@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: jitao shi <jitao.shi@mediatek.com>
Gerrit-Reviewer: yongqiang niu <yongqiang.niu@mediatek.com>
Gerrit-CC: Hung-Te Lin <hungte@chromium.org>
Gerrit-CC: Julius Werner <jwerner@chromium.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Thu, 13 Jun 2019 00:54:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment